summaryrefslogtreecommitdiff
path: root/src/ui/root.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-09-26 07:26:13 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-09-26 07:27:56 +0300
commit44b80a27509a5afa8763bd31b1d28883dbe43e10 (patch)
tree43621cf528630d375e725795675205b1b464ff6e /src/ui/root.c
parentb6c2742f6beb0bc162ea9fdc43050e14c784eb33 (diff)
Root: Crash when closing split view
Some deleted widgets were kept around in the root's onTop list.
Diffstat (limited to 'src/ui/root.c')
-rw-r--r--src/ui/root.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/root.c b/src/ui/root.c
index 90c0c6e4..c014ffa8 100644
--- a/src/ui/root.c
+++ b/src/ui/root.c
@@ -244,6 +244,8 @@ void init_Root(iRoot *d) {
244 244
245void deinit_Root(iRoot *d) { 245void deinit_Root(iRoot *d) {
246 iReleasePtr(&d->widget); 246 iReleasePtr(&d->widget);
247 delete_PtrArray(d->onTop);
248 delete_PtrSet(d->pendingDestruction);
247} 249}
248 250
249void setCurrent_Root(iRoot *root) { 251void setCurrent_Root(iRoot *root) {
@@ -284,7 +286,7 @@ void destroyPending_Root(iRoot *d) {
284 if (widget->parent) { 286 if (widget->parent) {
285 removeChild_Widget(widget->parent, widget); 287 removeChild_Widget(widget->parent, widget);
286 } 288 }
287 iAssert(widget->parent == NULL); 289 iAssert(widget->parent == NULL);
288 iRelease(widget); 290 iRelease(widget);
289 remove_PtrSetIterator(&i); 291 remove_PtrSetIterator(&i);
290 } 292 }