diff --git a/src/apps/haikudepot/ui/FeaturedPackagesView.cpp b/src/apps/haikudepot/ui/FeaturedPackagesView.cpp index 90a4f2ff9a..b7246578a0 100644 --- a/src/apps/haikudepot/ui/FeaturedPackagesView.cpp +++ b/src/apps/haikudepot/ui/FeaturedPackagesView.cpp @@ -327,13 +327,17 @@ FeaturedPackagesView::Clear() void FeaturedPackagesView::SelectPackage(const PackageInfoRef& package) { + BString selectedTitle; + if (package.Get() != NULL) + selectedTitle = package->Title(); + for (int32 i = 0; BLayoutItem* item = fPackageListLayout->ItemAt(i); i++) { PackageView* view = dynamic_cast(item->View()); if (view == NULL) break; BString title = view->PackageTitle(); - view->SetSelected(title == package->Title()); + view->SetSelected(title == selectedTitle); } }