mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-08 20:09:36 +01:00
Fix crash when ScriptEditor accesses Script with no language set
This commit is contained in:
parent
ec3d97dda5
commit
042b592de5
@ -3631,8 +3631,9 @@ bool ScriptEditorPlugin::handles(Object *p_object) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Object::cast_to<Script>(p_object)) {
|
||||
return true;
|
||||
Script *script = Object::cast_to<Script>(p_object);
|
||||
if (script) {
|
||||
return script->get_language() != nullptr; // Could be a PluginScript with no language attached.
|
||||
}
|
||||
|
||||
return p_object->is_class("Script");
|
||||
|
Loading…
Reference in New Issue
Block a user