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
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2021-01-27 18:54:09 +0300
committerSergey Sharybin <sergey@blender.org>2021-01-27 18:54:29 +0300
commitded494090114696dfc1c919205ff890c20c62bd2 (patch)
treeb4ee97783c97c9ec562f4697afc6aabad420e5ec
parent0af512abdf05380088f63e38cac6dbaf90003be0 (diff)
Fix possible dereference of nullptr mask
-rw-r--r--source/blender/editors/mask/mask_query.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/mask/mask_query.c b/source/blender/editors/mask/mask_query.c
index 8f4f14a1ba8..eace146dbe9 100644
--- a/source/blender/editors/mask/mask_query.c
+++ b/source/blender/editors/mask/mask_query.c
@@ -609,17 +609,17 @@ bool ED_mask_selected_minmax(const bContext *C, float min[2], float max[2], bool
Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
Mask *mask = CTX_data_edit_mask(C);
- /* Use evaluated mask to take animation into account.
- * The animation of splies is not "flushed" back to original, so need to explicitly
- * sue evaluated datablock here. */
- Mask *mask_eval = (Mask *)DEG_get_evaluated_id(depsgraph, &mask->id);
-
bool ok = false;
if (mask == NULL) {
return ok;
}
+ /* Use evaluated mask to take animation into account.
+ * The animation of splies is not "flushed" back to original, so need to explicitly
+ * sue evaluated datablock here. */
+ Mask *mask_eval = (Mask *)DEG_get_evaluated_id(depsgraph, &mask->id);
+
INIT_MINMAX2(min, max);
for (MaskLayer *mask_layer = mask_eval->masklayers.first; mask_layer != NULL;
mask_layer = mask_layer->next) {