diff --git a/src/modules/sni/item.cpp b/src/modules/sni/item.cpp index 0295153e..b2c41edb 100644 --- a/src/modules/sni/item.cpp +++ b/src/modules/sni/item.cpp @@ -319,14 +319,15 @@ void Item::updateImage() { Glib::RefPtr Item::getIconPixbuf() { try { + if (icon_pixmap) { + return icon_pixmap; + } if (!icon_name.empty()) { std::ifstream temp(icon_name); if (temp.is_open()) { return Gdk::Pixbuf::create_from_file(icon_name); } return getIconByName(icon_name, getScaledIconSize()); - } else if (icon_pixmap) { - return icon_pixmap; } } catch (Glib::Error& e) { spdlog::error("Item '{}': {}", id, static_cast(e.what()));