diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index bd428941e0f..702876ecdc4 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -405,7 +405,7 @@ static Ref _get_parent_class(GDCompletionContext &context) { if (script.is_null()) { return REF(); } - if (script->is_valid()) { + if (!script->is_valid()) { return REF(); }