ui/common/types.c

changeset 167
161511838ea6
parent 157
0b33b9396851
child 174
0358f1d9c506
--- a/ui/common/types.c	Tue Dec 08 15:19:31 2020 +0100
+++ b/ui/common/types.c	Thu Dec 10 13:42: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