[Bf-blender-cvs] [a88076e948a] master: Fix error in previous commit

Julian Eisel noreply at git.blender.org
Thu Oct 15 20:40:15 CEST 2020


Commit: a88076e948a93c087e1b20bb3d3c424db0f39fbe
Author: Julian Eisel
Date:   Thu Oct 15 20:39:20 2020 +0200
Branches: master
https://developer.blender.org/rBa88076e948a93c087e1b20bb3d3c424db0f39fbe

Fix error in previous commit

Missing null-check, could lead to null-pointer dereference.

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

M	source/blender/editors/space_outliner/outliner_edit.c

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

diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 85e841538d6..4a9aa984398 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -387,7 +387,7 @@ static int outliner_item_rename(bContext *C, wmOperator *op, const wmEvent *even
     TreeElement *hovered = outliner_find_item_at_y(
         space_outliner, &space_outliner->tree, fmval[1]);
 
-    if (outliner_item_is_co_over_name(hovered, fmval[0])) {
+    if (hovered && outliner_item_is_co_over_name(hovered, fmval[0])) {
       do_item_rename(region, hovered, TREESTORE(hovered), op->reports);
     }
   }



More information about the Bf-blender-cvs mailing list