diff --git a/Orange/widgets/data/owfeaturestatistics.py b/Orange/widgets/data/owfeaturestatistics.py index 2afa21c35e3..a543fea8b4d 100644 --- a/Orange/widgets/data/owfeaturestatistics.py +++ b/Orange/widgets/data/owfeaturestatistics.py @@ -807,7 +807,7 @@ def __restore_selection(self): def __restore_sorting(self): """Restore the sort column and order from saved settings.""" sort_column, sort_order = self.sorting - if sort_column < self.model.columnCount(): + if self.data is not None and sort_column < self.model.columnCount(): self.model.sort(sort_column, sort_order) self.table_view.horizontalHeader().setSortIndicator(sort_column, sort_order)