Qt: Add null check for gamelist icons

This commit is contained in:
TheLastRar
2025-10-09 16:57:55 +02:00
committed by GovanifY
parent a67409bfc6
commit 3cac2cf7c2
+4
View File
@@ -131,6 +131,10 @@ namespace
// Fetch icon pixmap
const QRect r = option.rect;
const QPixmap pix = qvariant_cast<QPixmap>(index.data(Qt::DecorationRole));
if (pix.isNull())
return;
const int pix_width = static_cast<int>(pix.width() / pix.devicePixelRatio());
const int pix_height = static_cast<int>(pix.height() / pix.devicePixelRatio());