gtk: Do not attempt to use now-freed scaffolding when iterating them to quit

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2020-05-22 20:29:20 +01:00
parent 804faacf82
commit 9c0fa9c939
No known key found for this signature in database
GPG Key ID: C30DF439F2987D74

View File

@ -1285,8 +1285,9 @@ nserror nsgtk_scaffolding_destroy_all(void)
/* iterate all scaffolding windows and destroy them */
while (gs != NULL) {
struct nsgtk_scaffolding *next = gs->next;
gtk_widget_destroy(GTK_WIDGET(gs->window));
gs = gs->next;
gs = next;
}
return NSERROR_OK;
}