From 0ac26eefa27f24385fe844e43f84abe44dcf7137 Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Tue, 9 Jun 2020 15:25:29 -0300 Subject: [PATCH] fix problem when in watershed and user remove the showing mask --- invesalius/data/slice_.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invesalius/data/slice_.py b/invesalius/data/slice_.py index fdaf6ef..0e8ac7e 100644 --- a/invesalius/data/slice_.py +++ b/invesalius/data/slice_.py @@ -627,7 +627,7 @@ class Slice(metaclass=utils.Singleton): self.buffer_slices[orientation].vtk_image = image self.buffer_slices[orientation].vtk_mask = mask - if self.to_show_aux == "watershed" and self.current_mask.is_shown: + if self.to_show_aux == "watershed" and self.current_mask is not None and self.current_mask.is_shown: m = self.get_aux_slice("watershed", orientation, slice_number) tmp_vimage = converters.to_vtk(m, self.spacing, slice_number, orientation) cimage = self.do_custom_colour( -- libgit2 0.21.2