diff --git a/src/apps/people/PersonView.cpp b/src/apps/people/PersonView.cpp index f1e308c368..6552f321a1 100644 --- a/src/apps/people/PersonView.cpp +++ b/src/apps/people/PersonView.cpp @@ -41,6 +41,7 @@ PersonView::PersonView(const char* name, const char* categoryAttribute, const entry_ref *ref) : BGridView(), + fGroups(NULL), fControls(20, false), fCategoryAttribute(categoryAttribute) { @@ -142,6 +143,9 @@ PersonView::MessageReceived(BMessage* msg) void PersonView::BuildGroupMenu() { + if (fGroups == NULL) + return; + BMenuItem* item; while ((item = fGroups->ItemAt(0)) != NULL) { fGroups->RemoveItem(item);