forked from bartvdbraak/blender
Background Fit could set inf zoom
This commit is contained in:
parent
f212bfa3cd
commit
f2d7356f16
@ -345,7 +345,7 @@ static int backimage_fit_exec(bContext *C, wmOperator *UNUSED(op))
|
|||||||
ima = BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node");
|
ima = BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node");
|
||||||
ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock);
|
ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock);
|
||||||
|
|
||||||
if (ibuf == NULL) {
|
if ((ibuf == NULL) || (ibuf->x == 0) || (ibuf->y == 0)) {
|
||||||
BKE_image_release_ibuf(ima, ibuf, lock);
|
BKE_image_release_ibuf(ima, ibuf, lock);
|
||||||
return OPERATOR_CANCELLED;
|
return OPERATOR_CANCELLED;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user