Fix crash for player with last vote (which means VoteOverview
is articially pushed).
This commit is contained in:
parent
f6398f3661
commit
4b74c673fe
@ -41,7 +41,8 @@ using namespace irr::video;
|
|||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
VoteOverview::VoteOverview() : Screen("online/vote_overview.stkgui")
|
VoteOverview::VoteOverview() : Screen("online/vote_overview.stkgui")
|
||||||
{
|
{
|
||||||
m_quit_server = false;
|
m_quit_server = false;
|
||||||
|
m_timer = NULL;
|
||||||
} // VoteOverview
|
} // VoteOverview
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
@ -214,7 +215,9 @@ void VoteOverview::onUpdate(float dt)
|
|||||||
*/
|
*/
|
||||||
void VoteOverview::setResult(const PeerVote &winner_vote)
|
void VoteOverview::setResult(const PeerVote &winner_vote)
|
||||||
{
|
{
|
||||||
m_timer->setVisible(false);
|
// If the GUI is forced from the server lobby, m_timer is not defined
|
||||||
|
if(m_timer) m_timer->setVisible(false);
|
||||||
|
|
||||||
// Note that the votes on the server might have a different order from
|
// Note that the votes on the server might have a different order from
|
||||||
// the votes here on the client. Potentially there could also be a missing
|
// the votes here on the client. Potentially there could also be a missing
|
||||||
// vote(??)
|
// vote(??)
|
||||||
|
Loading…
Reference in New Issue
Block a user