Skip to content

Commit

Permalink
Fix segfault on quitting with open node formspec (#8608)
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallJoker committed Jun 21, 2019
1 parent 39c54e1 commit 4e3c191
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/client/gameui.cpp
Expand Up @@ -306,11 +306,10 @@ void GameUI::toggleProfiler()

void GameUI::deleteFormspec()
{
if (m_formspec)
m_formspec->quitMenu();

delete m_formspec;
m_formspec = nullptr;
if (m_formspec) {
m_formspec->drop();
m_formspec = nullptr;
}

m_formname.clear();
}

0 comments on commit 4e3c191

Please sign in to comment.