Skip to content

Commit

Permalink
Fix null pointer dereference in MNV NetTree. Coverity 1026722
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartm committed Jun 3, 2013
1 parent aa3f30c commit a7c0e41
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mythplugins/mythnetvision/mythnetvision/nettree.cpp
Expand Up @@ -39,7 +39,7 @@ namespace
if (item)
return item->GetData().value<MythGenericTree *>();

return 0;
return NULL;
}
}

Expand Down Expand Up @@ -360,6 +360,9 @@ void NetTree::UpdateItem(MythUIButtonListItem *item)
void NetTree::handleSelect(MythUIButtonListItem *item)
{
MythGenericTree *node = GetNodePtrFromButton(item);
if (!node)
return;

int nodeInt = node->getInt();

switch (nodeInt)
Expand Down

0 comments on commit a7c0e41

Please sign in to comment.