Commit 573100ed authored by David Faure's avatar David Faure
Browse files

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

(seen during plasma-bigscreen startup)

(cherry picked from commit 13616ee1)
parent 70fa173d
......@@ -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