File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -121,8 +121,7 @@ struct TextDestPlayerInventory : public TextDest
121
121
122
122
struct LocalFormspecHandler : public TextDest
123
123
{
124
- LocalFormspecHandler (const std::string &formname):
125
- m_client (NULL )
124
+ LocalFormspecHandler (const std::string &formname)
126
125
{
127
126
m_formname = formname;
128
127
}
@@ -174,10 +173,11 @@ struct LocalFormspecHandler : public TextDest
174
173
}
175
174
176
175
// Don't disable this part when modding is disabled, it's used in builtin
177
- m_client->getScript ()->on_formspec_input (m_formname, fields);
176
+ if (m_client && m_client->getScript ())
177
+ m_client->getScript ()->on_formspec_input (m_formname, fields);
178
178
}
179
179
180
- Client *m_client;
180
+ Client *m_client = nullptr ;
181
181
};
182
182
183
183
/* Form update callback */
You can’t perform that action at this time.
0 commit comments