Fix crash on exit when removing EditorInspectorPlugins
This commit is contained in:
committed by
Rémi Verschelde
parent
4a8f219660
commit
27f9780cc6
@ -1294,6 +1294,10 @@ 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];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (idx == inspector_plugin_count - 1)
|
||||||
|
inspector_plugins[idx] = Ref<EditorInspectorPlugin>();
|
||||||
|
|
||||||
inspector_plugin_count--;
|
inspector_plugin_count--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user