[Bf-blender-cvs] [eeba31e2ca8] master: Fix T69910: crash when using a hotkey for a new or open recent file

Pedro Reis noreply at git.blender.org
Fri Oct 4 16:58:34 CEST 2019


Commit: eeba31e2ca80863da19624721c2fcf020f13db53
Author: Pedro Reis
Date:   Fri Oct 4 16:55:37 2019 +0200
Branches: master
https://developer.blender.org/rBeeba31e2ca80863da19624721c2fcf020f13db53

Fix T69910: crash when using a hotkey for a new or open recent file

Differential Revision: https://developer.blender.org/D5839

===================================================================

M	source/blender/windowmanager/intern/wm_event_system.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 1eec08c2e7a..a744cfb8c28 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -2738,7 +2738,10 @@ static int wm_handlers_do_intern(bContext *C, wmEvent *event, ListBase *handlers
         /* Clear the tool-tip whenever a key binding is handled, without this tool-tips
          * are kept when a modal operators starts (annoying but otherwise harmless). */
         if (action & WM_HANDLER_BREAK) {
-          WM_tooltip_clear(C, CTX_wm_window(C));
+          /* Window may be gone after file read. */
+          if (CTX_wm_window(C) != NULL) {
+            WM_tooltip_clear(C, CTX_wm_window(C));
+          }
         }
       }
       else if (handler_base->type == WM_HANDLER_TYPE_UI) {



More information about the Bf-blender-cvs mailing list