]> git.eshelyaron.com Git - emacs.git/commitdiff
Pacify gcc -Wanalyzer-null-dereference
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 Apr 2022 00:20:34 +0000 (17:20 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 Apr 2022 00:21:00 +0000 (17:21 -0700)
* 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

index b9a5355b4152bdbfb09ccd5de30a71d98b5e5ec6..42ab90df751c939c1e72dac903688300142f0483 100644 (file)
@@ -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);
          }