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:
authorCampbell Barton <campbell@blender.org>2022-05-19 03:14:30 +0300
committerCampbell Barton <campbell@blender.org>2022-05-19 04:17:01 +0300
commite9c3af3dd76641922b1b3e83095d72ce8968fd9b (patch)
treececd9abaceb5b6a3f85e443850d13ab19ddc8aa1 /source/blender/editors/sculpt_paint/sculpt_paint_image.cc
parent6730c11dd9f084512bab03e8668de3be0bce42e5 (diff)
Cleanup: always assign return args for SCULPT_paint_image_canvas_get
Asserting the variables weren't NULL raised a warning with GCC 12.1, instead of suppressing the warning, always assign NULL which is often expected behavior and makes the function work as documented.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_paint_image.cc')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_paint_image.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc
index b0c33a65bc9..975a8f21aaf 100644
--- a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc
@@ -460,8 +460,9 @@ bool SCULPT_paint_image_canvas_get(PaintModeSettings *paint_mode_settings,
Image **r_image,
ImageUser **r_image_user)
{
- BLI_assert(r_image);
- BLI_assert(r_image_user);
+ *r_image = nullptr;
+ *r_image_user = nullptr;
+
ImageData image_data;
if (!ImageData::init_active_image(ob, &image_data, paint_mode_settings)) {
return false;