Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2019-07-09 12:51:56 +0300
committerSybren A. Stüvel <sybren@blender.org>2019-07-09 12:52:16 +0300
commit805cabdf177af6c71da6239ff3fc5d2524286a18 (patch)
treeba5008d475de6c87200073dd163d0cd44c5da91c /source
parent2b43ec56af2a02ff0be1e128b63261bb57cda100 (diff)
Fix T64483: crash when hovering over outliner after closing render window
The `tselem->id` pointer can also be used for non-ID data (according to this comment in DNA_outliner_types.h: ``` /* XXX We actually also store non-ID data in this pointer for identifying * the TreeStoreElem for a TreeElement when rebuilding the tree. Ugly! */ ``` As such, I don't mind adding a `NULL`-check in the `is_object_data_in_editmode()` function. After all, when there is no object, its data certainly is not in edit mode.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 7451c8672f4..31783e09aeb 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -116,6 +116,10 @@ static void outliner_tree_dimensions(SpaceOutliner *soops, int *r_width, int *r_
*/
static bool is_object_data_in_editmode(const ID *id, const Object *obact)
{
+ if (id == NULL) {
+ return false;
+ }
+
const short id_type = GS(id->name);
if (id_type == ID_GD && obact && obact->data == id) {