Fixing reboot runtime if no map vote is called with it enabled (#32181)

Co-authored-by: kanef <kanef9x@protonmail.com>
This commit is contained in:
kane-f
2022-03-09 03:09:57 +00:00
committed by GitHub
parent 95db554606
commit 3ed30452cf

View File

@@ -207,7 +207,7 @@ var/auxtools_path
..()
return
if(config.map_voting)
if(config.map_voting && vote.winner && vote.map_paths.len)
//get filename
var/filename = "vgstation13.dmb"
var/map_path = "maps/voting/" + vote.map_paths[vote.winner] + "/" + filename
@@ -216,7 +216,7 @@ var/auxtools_path
if(!fcopy(map_path, filename))
fdel(filename)
fcopy(map_path, filename)
pre_shutdown()
..()
@@ -361,4 +361,4 @@ var/auxtools_path
/* does this help? I do not know */
if (src.status != s)
src.status = s
src.status = s