Skip to content
Snippets Groups Projects
Commit 1a45e650 authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

object-manager: fix crash when global is removed before it was added in the globals list

parent c8f83c99
No related branches found
No related tags found
No related merge requests found
...@@ -658,7 +658,8 @@ registry_global_remove (void *data, uint32_t id) ...@@ -658,7 +658,8 @@ registry_global_remove (void *data, uint32_t id)
WpRegistry *self = data; WpRegistry *self = data;
WpGlobal *global = NULL; WpGlobal *global = NULL;
global = g_ptr_array_index (self->globals, id); if (id < self->globals->len)
global = g_ptr_array_index (self->globals, id);
/* if not found, look in the tmp_globals, as it may still not be exposed */ /* if not found, look in the tmp_globals, as it may still not be exposed */
if (!global) { if (!global) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment