Changeset 1aa8c86 in mainline


Ignore:
Timestamp:
2021-11-03T21:05:07Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f05f413
Parents:
552b69f
git-author:
Jiri Svoboda <jiri@…> (2021-11-03 21:04:31)
git-committer:
Jiri Svoboda <jiri@…> (2021-11-03 21:05:07)
Message:

Fix navigator crashing if it cannot initialize output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/nav/nav.c

    r552b69f r1aa8c86  
    230230
    231231        for (i = 0; i < 2; i++) {
    232                 ui_fixed_remove(navigator->fixed,
    233                     panel_ctl(navigator->panel[i]));
    234                 panel_destroy(navigator->panel[i]);
    235         }
    236 
    237         ui_fixed_remove(navigator->fixed, nav_menu_ctl(navigator->menu));
    238 
    239         if (navigator->menu != NULL)
     232                if (navigator->panel[i] != NULL) {
     233                        ui_fixed_remove(navigator->fixed,
     234                            panel_ctl(navigator->panel[i]));
     235                        panel_destroy(navigator->panel[i]);
     236                }
     237        }
     238
     239
     240        if (navigator->menu != NULL) {
     241                ui_fixed_remove(navigator->fixed, nav_menu_ctl(navigator->menu));
    240242                nav_menu_destroy(navigator->menu);
     243        }
     244
    241245        if (navigator->window != NULL)
    242246                ui_window_destroy(navigator->window);
Note: See TracChangeset for help on using the changeset viewer.