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.
This commit is contained in:
parent
6730c11dd9
commit
e9c3af3dd7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue