From: SmallJoker Date: Fri, 21 Jun 2019 19:00:30 +0000 (+0200) Subject: Fix segfault on quitting with open node formspec (#8608) X-Git-Tag: 5.1.0~190 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4e3c1916f731058a137ec1f9eecf2b7eff4d8fcc;p=oweals%2Fminetest.git Fix segfault on quitting with open node formspec (#8608) --- 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(); }