aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2017-07-02 22:26:25 +0200
committersfan5 <sfan5@live.de>2018-06-10 17:18:11 +0200
commit119aa5c91977ce5381e399e21eabf390e5cb5f5e (patch)
treeac314edfbb4c55c2e77a05f0950a2e3d002f0f75 /src
parentfb4bfc60deeab6c54e9c51f7f7a0ccf595e42b77 (diff)
downloadminetest-119aa5c91977ce5381e399e21eabf390e5cb5f5e.tar.gz
minetest-119aa5c91977ce5381e399e21eabf390e5cb5f5e.tar.bz2
minetest-119aa5c91977ce5381e399e21eabf390e5cb5f5e.zip
Fix crash due to missing pointer validation
Based on commit 014a1a0
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp3
1 files changed, 2 insertions, 1 deletions
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;