Explorar o código

Merge pull request #66298 from Mickeon/3.x-language-stroke

Rémi Verschelde %!s(int64=3) %!d(string=hai) anos
pai
achega
2157c50d17
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      editor/plugins/script_editor_plugin.cpp

+ 3 - 2
editor/plugins/script_editor_plugin.cpp

@@ -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");