diff options
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index b40a7e4702e..6719e371d63 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -923,10 +923,13 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN } /* preview */ - if (node->flag & NODE_PREVIEW) { - bNodePreview *preview = previews ? BKE_node_instance_hash_lookup(previews, key) : NULL; - if (preview && preview->rect && !BLI_rctf_is_empty(&node->prvr)) - node_draw_preview(preview, &node->prvr); + if (node->flag & NODE_PREVIEW && previews) { + bNodePreview *preview = BKE_node_instance_hash_lookup(previews, key); + if (preview->xsize && preview->ysize) { + if (preview->rect && !BLI_rctf_is_empty(&node->prvr)) { + node_draw_preview(preview, &node->prvr); + } + } } UI_ThemeClearColor(color_id); |