[MIRROR] Fixes a runtime with map voting [MDB IGNORE] (#16259)

* Fixes a runtime with map voting (#69908)

* Adds a sanity check in voting, in case no one actually voted.

* Fixes a runtime with map voting

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
This commit is contained in:
SkyratBot
2022-09-15 20:38:38 +02:00
committed by GitHub
parent 3c80d6bfd0
commit c84b31f566

View File

@@ -94,7 +94,8 @@ SUBSYSTEM_DEF(vote)
to_chat(world, span_infoplain(vote_font("\n[to_display]")))
// Finally, doing any effects on vote completion
current_vote.finalize_vote(final_winner)
if (final_winner) // if no one voted final_winner will be null
current_vote.finalize_vote(final_winner)
/datum/controller/subsystem/vote/proc/submit_vote(mob/voter, their_vote)
if(!current_vote)