You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-25 15:37:42 +00:00
[3.x] Fix crash when ScriptEditor accesses Script with no language set
This commit is contained in:
@@ -3595,8 +3595,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");
|
||||
|
||||
Reference in New Issue
Block a user