Fix crash in tst_QSystemTrayIcon::lastWindowClosed()
Handle null QIcons. Note this was already fixed in 5.15 separately, see 6c8adfaf5dc. Fixes: QTBUG-87729 Change-Id: Ia759fbe95fafcea9451d393dc1aa077f5651919b Reviewed-by: Liang Qi <liang.qi@qt.io>bb10
parent
bb71abdfbd
commit
e8873003f0
|
|
@ -66,6 +66,8 @@ static const int IconNormalMediumSize = 64;
|
|||
QXdgDBusImageVector iconToQXdgDBusImageVector(const QIcon &icon)
|
||||
{
|
||||
QXdgDBusImageVector ret;
|
||||
if (icon.isNull())
|
||||
return ret;
|
||||
QIconEngine *engine = const_cast<QIcon &>(icon).data_ptr()->engine;
|
||||
QList<QSize> sizes = engine->availableSizes(QIcon::Normal, QIcon::Off);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue