struct LocalFormspecHandler : public TextDest
{
- LocalFormspecHandler(const std::string &formname):
- m_client(NULL)
+ LocalFormspecHandler(const std::string &formname)
{
m_formname = formname;
}
}
// 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;
+ Client *m_client = nullptr;
};
/* Form update callback */