NewModelItem can potentially return NULL in a number of cases, which wasn't checked for. Don't try to add them or otherwise manipulate them in such a case. Fixes CID 641.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37828 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
62ffe41831
commit
8d50f4a598
@ -166,6 +166,9 @@ FavoritesMenu::AddNextItem()
|
|||||||
model.IsDirectory() ? fOpenFolderMessage : fOpenFileMessage,
|
model.IsDirectory() ? fOpenFolderMessage : fOpenFileMessage,
|
||||||
fTarget);
|
fTarget);
|
||||||
|
|
||||||
|
if (item == NULL)
|
||||||
|
return true;
|
||||||
|
|
||||||
item->SetLabel(ref.name); // this is the name of the link in the Go dir
|
item->SetLabel(ref.name); // this is the name of the link in the Go dir
|
||||||
|
|
||||||
if (!fAddedSeparatorForSection) {
|
if (!fAddedSeparatorForSection) {
|
||||||
|
Loading…
Reference in New Issue
Block a user