Commit 13616ee1 authored by David Faure's avatar David Faure

Fix warning about connecting to a null sender, favoritesModel can be null

(seen during plasma-bigscreen startup)
parent 38c269dc
......@@ -81,7 +81,9 @@ InvalidAppsFilterProxy::~InvalidAppsFilterProxy()
void InvalidAppsFilterProxy::connectNewFavoritesModel()
{
KAStatsFavoritesModel* favoritesModel = static_cast<KAStatsFavoritesModel *>(m_parentModel->favoritesModel());
connect(favoritesModel, &KAStatsFavoritesModel::favoritesChanged, this, &QSortFilterProxyModel::invalidate);
if (favoritesModel) {
connect(favoritesModel, &KAStatsFavoritesModel::favoritesChanged, this, &QSortFilterProxyModel::invalidate);
}
invalidate();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment