Only connect ClearPixmapDiskCache if app is set

This commit is contained in:
Jonas Kvinge 2020-05-16 18:25:13 +02:00
parent 37cf0c2fb6
commit b0966f14e6
1 changed files with 3 additions and 1 deletions

View File

@ -139,7 +139,9 @@ CollectionModel::CollectionModel(CollectionBackend *backend, Application *app, Q
backend_->UpdateTotalArtistCountAsync();
backend_->UpdateTotalAlbumCountAsync();
connect(app_, SIGNAL(ClearPixmapDiskCache()), SLOT(ClearDiskCache()));
if (app_) {
connect(app_, SIGNAL(ClearPixmapDiskCache()), SLOT(ClearDiskCache()));
}
ReloadSettings();