From 743a95f8139fb30705352d721f17ff3217e460b6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 5 Apr 2022 17:20:34 -0700 Subject: [PATCH] Pacify gcc -Wanalyzer-null-dereference MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * src/xterm.c (handle_one_xevent): Don’t dereference HOLD_QUIT if it’s null. Potential problem found with gcc 11.2.1 20220127 (Red Hat 11.2.1-9), when configured with --enable-gcc-warnings. --- src/xterm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index b9a5355b415..42ab90df751 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -13826,7 +13826,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (x_dnd_in_progress || x_dnd_waiting_for_finish) { - *hold_quit = inev.ie; + if (hold_quit) + *hold_quit = inev.ie; EVENT_INIT (inev.ie); } -- 2.39.5