Skip to content

Commit

Permalink
Fix EditorPlugin.remove_inspector_plugin() instance cleanup
Browse files Browse the repository at this point in the history
(cherry picked from commit da94b61)
  • Loading branch information
timothyqiu authored and akien-mga committed Dec 6, 2021
1 parent 3be071f commit dcb5d7a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions editor/editor_inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1234,10 +1234,7 @@ void EditorInspector::remove_inspector_plugin(const Ref<EditorInspectorPlugin> &
for (int i = idx; i < inspector_plugin_count - 1; i++) {
inspector_plugins[i] = inspector_plugins[i + 1];
}

if (idx == inspector_plugin_count - 1) {
inspector_plugins[idx] = Ref<EditorInspectorPlugin>();
}
inspector_plugins[inspector_plugin_count - 1] = Ref<EditorInspectorPlugin>();

inspector_plugin_count--;
}
Expand Down

0 comments on commit dcb5d7a

Please sign in to comment.