Skip to content

Commit

Permalink
fix(gui): avoid crashing when copying source image to a tab with a ma…
Browse files Browse the repository at this point in the history
…sk canvas
  • Loading branch information
ssube committed Dec 21, 2023
1 parent 9a3384b commit a3fad5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gui/src/components/input/MaskCanvas.tsx
Expand Up @@ -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;
}
Expand Down

0 comments on commit a3fad5c

Please sign in to comment.