diff --git a/src/services/abstract/category.cpp b/src/services/abstract/category.cpp index 1b3d8104d..4bc7047cd 100755 --- a/src/services/abstract/category.cpp +++ b/src/services/abstract/category.cpp @@ -47,7 +47,11 @@ Category::Category(const QSqlRecord& record) : Category(nullptr) { setCreationDate(TextFactory::parseDateTime(record.value(CAT_DB_DCREATED_INDEX).value()).toLocalTime()); - setIcon(qApp->icons()->fromByteArray(record.value(CAT_DB_ICON_INDEX).toByteArray())); + QIcon loaded_icon = qApp->icons()->fromByteArray(record.value(CAT_DB_ICON_INDEX).toByteArray()); + + if (!loaded_icon.isNull()) { + setIcon(loaded_icon); + } } Category::~Category() {}