X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fgtkwin.c;h=eb8db5686d439695a3a3903b641869de3d1aa123;hb=916cd3f0cd99d0fafc594fb21dfadc2512aa6700;hp=da40e5447324d5fc84a933d1e71874bb30eb24b5;hpb=896f9f22562b7f32946c7d3310655ec4d52b0a5e;p=PuTTY.git 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) {