fix(gui): avoid crashing when copying source image to a tab with a mask canvas
This commit is contained in:
parent
9a3384b348
commit
a3fad5c541
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue