X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/b8af224e6169e1eec348e8af10b01ac2ebe54347..0c1fe54fe7c1003f2b35d97b218797fd35b806a2:/unix/gtkwin.c diff --git a/unix/gtkwin.c b/unix/gtkwin.c index da40e544..eb8db568 100644 --- a/unix/gtkwin.c +++ b/unix/gtkwin.c @@ -1379,13 +1379,11 @@ static gint idle_exit_func(gpointer data) ldisc_free(inst->ldisc); inst->ldisc = NULL; } - if (inst->back) { - inst->back->free(inst->backhandle); - inst->backhandle = NULL; - inst->back = NULL; - term_provide_resize_fn(inst->term, NULL, NULL); - update_specials_menu(inst); - } + inst->back->free(inst->backhandle); + inst->backhandle = NULL; + inst->back = NULL; + term_provide_resize_fn(inst->term, NULL, NULL); + update_specials_menu(inst); gtk_widget_set_sensitive(inst->restartitem, TRUE); } @@ -1597,7 +1595,7 @@ void palette_set(void *frontend, int n, int r, int g, int b) struct gui_data *inst = (struct gui_data *)frontend; if (n >= 16) n += 256 - 16; - if (n > NALLCOLOURS) + if (n >= NALLCOLOURS) return; real_palette_set(inst, n, r, g, b); if (n == 258) {