allow ui_list_update called with unbound lists newapi

Mon, 28 Oct 2024 07:41:47 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Mon, 28 Oct 2024 07:41:47 +0100
branch
newapi
changeset 361
16c8b9ea3aa3
parent 360
681b930abe84
child 362
59e94e97ba68

allow ui_list_update called with unbound lists

ui/common/types.c file | annotate | diff | comparison | revisions
--- a/ui/common/types.c	Sun Oct 27 12:08:10 2024 +0100
+++ b/ui/common/types.c	Mon Oct 28 07:41:47 2024 +0100
@@ -159,7 +159,9 @@
 }
 
 UIEXPORT void ui_list_update(UiList *list) {
-    list->update(list, 0);
+    if(list->update) {
+        list->update(list, 0);
+    }
 }
 
 void ui_list_addobsv(UiList *list, ui_callback f, void *data) {

mercurial