diff --git a/src/silx/gui/dialog/AbstractDataFileDialog.py b/src/silx/gui/dialog/AbstractDataFileDialog.py index 00db27509e..25dfcf5b08 100644 --- a/src/silx/gui/dialog/AbstractDataFileDialog.py +++ b/src/silx/gui/dialog/AbstractDataFileDialog.py @@ -641,7 +641,9 @@ def _clear(self): self.__browser.clear() self.__closeFile() self.__fileModel = None - self.__dataModel = None + if self.__dataModel is not None: + self.__dataModel.deleteLater() + self.__dataModel = None def hasPendingEvents(self): """Returns true if the dialog have asynchronous tasks working on the