ui/gtk/menu.c

changeset 98
16e84fac48bd
parent 95
e92c72705da4
--- a/ui/gtk/menu.c	Thu Nov 28 18:03:12 2024 +0100
+++ b/ui/gtk/menu.c	Fri Nov 29 22:11:07 2024 +0100
@@ -254,8 +254,8 @@
     ls->userdata = il->userdata;
     
     UiObserver *observer = ui_observer_new((ui_callback)ui_update_menuitem_list, ls);
-    list->observers = ui_obsvlist_add(list->observers, observer);
-    uic_list_register_observer_destructor(obj->ctx, list, observer);
+    ls->list->observers = ui_obsvlist_add(ls->list->observers, observer);
+    uic_list_register_observer_destructor(obj->ctx, ls->list, observer);
     
     ui_update_menuitem_list(NULL, ls);
 }

mercurial