summaryrefslogtreecommitdiff
path: root/src/ui/widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r--src/ui/widget.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c
index d218d7ee..459c2ae1 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -124,13 +124,15 @@ int64_t flags_Widget(const iWidget *d) {
124} 124}
125 125
126void setFlags_Widget(iWidget *d, int64_t flags, iBool set) { 126void setFlags_Widget(iWidget *d, int64_t flags, iBool set) {
127 iChangeFlags(d->flags, flags, set); 127 if (d) {
128 if (flags & keepOnTop_WidgetFlag) { 128 iChangeFlags(d->flags, flags, set);
129 if (set) { 129 if (flags & keepOnTop_WidgetFlag) {
130 pushBack_PtrArray(onTop_RootData_(), d); 130 if (set) {
131 } 131 pushBack_PtrArray(onTop_RootData_(), d);
132 else { 132 }
133 removeOne_PtrArray(onTop_RootData_(), d); 133 else {
134 removeOne_PtrArray(onTop_RootData_(), d);
135 }
134 } 136 }
135 } 137 }
136} 138}