From 4e3c1916f731058a137ec1f9eecf2b7eff4d8fcc Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Fri, 21 Jun 2019 21:00:30 +0200 Subject: Fix segfault on quitting with open node formspec (#8608) --- src/client/gameui.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/client/gameui.cpp b/src/client/gameui.cpp index f3c3fefb6..33f7d1a8a 100644 --- a/src/client/gameui.cpp +++ b/src/client/gameui.cpp @@ -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(); } -- cgit v1.2.3