summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/gameui.cpp9
1 files 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();
}