mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 01:18:00 +00:00
gtkwin: remove a redundant test in delete_window.
We never expect to be passed a NULL GtkFrontend pointer, and even if we were, we'd have crashed several lines above this test. It was benign, of course, but Coverity (which pointed it out) dislikes this kind of thing on the basis that it's confusing - you ought to either test it for NULL properly, or not at all - and I see its point.
This commit is contained in:
parent
597e4731f9
commit
d33f889a56
@ -624,7 +624,7 @@ gint delete_window(GtkWidget *widget, GdkEvent *event, GtkFrontend *inst)
|
||||
if (!find_and_raise_dialog(inst, DIALOG_SLOT_WARN_ON_CLOSE)) {
|
||||
char *title = dupcat(appname, " Exit Confirmation");
|
||||
char *msg, *additional = NULL;
|
||||
if (inst && inst->backend && inst->backend->vt->close_warn_text) {
|
||||
if (inst->backend && inst->backend->vt->close_warn_text) {
|
||||
additional = inst->backend->vt->close_warn_text(inst->backend);
|
||||
}
|
||||
msg = dupprintf("Are you sure you want to close this session?%s%s",
|
||||
|
Loading…
Reference in New Issue
Block a user