Fix EditorPlugin.remove_inspector_plugin() instance cleanup
This commit is contained in:
parent
b8ebe3b0bf
commit
da94b61d09
1 changed files with 1 additions and 4 deletions
|
@ -2194,10 +2194,7 @@ void EditorInspector::remove_inspector_plugin(const Ref<EditorInspectorPlugin> &
|
||||||
for (int i = idx; i < inspector_plugin_count - 1; i++) {
|
for (int i = idx; i < inspector_plugin_count - 1; i++) {
|
||||||
inspector_plugins[i] = inspector_plugins[i + 1];
|
inspector_plugins[i] = inspector_plugins[i + 1];
|
||||||
}
|
}
|
||||||
|
inspector_plugins[inspector_plugin_count - 1] = Ref<EditorInspectorPlugin>();
|
||||||
if (idx == inspector_plugin_count - 1) {
|
|
||||||
inspector_plugins[idx] = Ref<EditorInspectorPlugin>();
|
|
||||||
}
|
|
||||||
|
|
||||||
inspector_plugin_count--;
|
inspector_plugin_count--;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue