1
0
Fork 0

fix(gui): avoid crashing when copying source image to a tab with a mask canvas

This commit is contained in:
Sean Sube 2023-12-20 19:03:20 -06:00
parent 9a3384b348
commit a3fad5c541
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ export function MaskCanvas(props: MaskCanvasProps) {
background.current.name = source.name;
// initialize the mask if it does not exist
if (doesExist(mask) === false) {
if (doesExist(maskRef.current) && doesExist(mask) === false) {
getClearContext(maskRef);
dirty.current = true;
}