Commit 670930efc5243f78c11770d39d476ad857cd85c8
1 parent
e7a6895d
Exists in
master
wrapping del self.matrix with a try because mask.matrix is already remove on Linux
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
invesalius/data/mask.py
... | ... | @@ -480,5 +480,9 @@ class Mask(): |
480 | 480 | self.save_history(index, orientation, matrix.copy(), cp_mask) |
481 | 481 | |
482 | 482 | def __del__(self): |
483 | - del self.matrix | |
483 | + # On Linux self.matrix is already removed so it gives an error | |
484 | + try: | |
485 | + del self.matrix | |
486 | + except AttributeError: | |
487 | + pass | |
484 | 488 | os.remove(self.temp_file) | ... | ... |