ui/common/types.c

changeset 2
ea89bbb0c4c8
parent 0
804d8803eade
--- a/ui/common/types.c	Wed Dec 09 11:33:00 2020 +0100
+++ b/ui/common/types.c	Thu Dec 10 13:43:25 2020 +0100
@@ -67,14 +67,15 @@
 }
 
 void ui_notify_except(UiObserver *observer, UiObserver *exc, void *data) {
+    UiEvent evt;
+    evt.obj = NULL;
+    evt.window = NULL;
+    evt.document = NULL;
+    evt.eventdata = data;
+    evt.intval = 0;
+    
     while(observer) {
-        if(observer != exc) {
-            UiEvent evt;
-            evt.obj = NULL;
-            evt.window = NULL;
-            evt.document = NULL;
-            evt.eventdata = data;
-            evt.intval = 0;
+        if(observer != exc) { 
             observer->callback(&evt, observer->data);
         }
         observer = observer->next;

mercurial