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

This commit is contained in:
Rémi Verschelde 2022-09-25 11:04:53 +02:00 committed by GitHub
commit 2157c50d17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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