瀏覽代碼

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

Rémi Verschelde 3 年之前
父節點
當前提交
2157c50d17
共有 1 個文件被更改,包括 3 次插入2 次删除
  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;
 		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");
 	return p_object->is_class("Script");