From 119aa5c91977ce5381e399e21eabf390e5cb5f5e Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Sun, 2 Jul 2017 22:26:25 +0200 Subject: Fix crash due to missing pointer validation Based on commit 014a1a0 --- src/game.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game.cpp b/src/game.cpp index facc68aea..5ad93b95a 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -170,7 +170,8 @@ struct LocalFormspecHandler : public TextDest } // Don't disable this part when modding is disabled, it's used in builtin - m_client->getScript()->on_formspec_input(m_formname, fields); + if (m_client && m_client->getScript()) + m_client->getScript()->on_formspec_input(m_formname, fields); } Client *m_client; -- cgit v1.2.3