diff --git a/invesalius/data/mask.py b/invesalius/data/mask.py index 9b3598a..070640b 100644 --- a/invesalius/data/mask.py +++ b/invesalius/data/mask.py @@ -480,5 +480,9 @@ class Mask(): self.save_history(index, orientation, matrix.copy(), cp_mask) def __del__(self): - del self.matrix + # On Linux self.matrix is already removed so it gives an error + try: + del self.matrix + except AttributeError: + pass os.remove(self.temp_file) -- libgit2 0.21.2