diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-02 13:02:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-02 14:10:15 +0300 |
commit | b608133075b6362aa067e32538fb5a5c7a3e5c30 (patch) | |
tree | 87e4e1f43c029a6ff0677a3fed2d60466da7fc77 /source/blender/windowmanager | |
parent | a08a8aa92895fbf12899b2f19508fcd9cb752277 (diff) |
Fix crash if no tool is set
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_toolsystem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_toolsystem.c b/source/blender/windowmanager/intern/wm_toolsystem.c index 508713c9096..cee5079a02f 100644 --- a/source/blender/windowmanager/intern/wm_toolsystem.c +++ b/source/blender/windowmanager/intern/wm_toolsystem.c @@ -541,7 +541,7 @@ void WM_toolsystem_update_from_context_view3d(bContext *C) bool WM_toolsystem_active_tool_is_brush(const bContext *C) { bToolRef_Runtime *tref_rt = WM_toolsystem_runtime_from_context((bContext *)C); - return tref_rt->data_block[0] != '\0'; + return tref_rt && (tref_rt->data_block[0] != '\0'); } /* Follow wmMsgNotifyFn spec */ |