mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-08 12:40:50 +00:00
Fix crash disabling extensions
This commit is contained in:
parent
1f34d0e46e
commit
ff3e9504fd
@ -226,6 +226,9 @@ Extension::Extension(const std::string& path,
|
|||||||
, m_isInstalled(true)
|
, m_isInstalled(true)
|
||||||
, m_isBuiltinExtension(isBuiltinExtension)
|
, m_isBuiltinExtension(isBuiltinExtension)
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_SCRIPTING
|
||||||
|
m_plugin.pluginRef = LUA_REFNIL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Extension::~Extension()
|
Extension::~Extension()
|
||||||
@ -326,12 +329,14 @@ void Extension::enable(const bool state)
|
|||||||
m_isEnabled = state;
|
m_isEnabled = state;
|
||||||
|
|
||||||
#ifdef ENABLE_SCRIPTING
|
#ifdef ENABLE_SCRIPTING
|
||||||
|
if (hasScripts()) {
|
||||||
if (m_isEnabled) {
|
if (m_isEnabled) {
|
||||||
initScripts();
|
initScripts();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
exitScripts();
|
exitScripts();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif // ENABLE_SCRIPTING
|
#endif // ENABLE_SCRIPTING
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user