Permalink
Browse files

Guard against possible null pointer dereference identified by Coverity.

  • Loading branch information...
1 parent 943bfe9 commit 46bcb72d3d0ac7698d7a9f60dda7c4ade89f7a87 @stuartm stuartm committed May 10, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 mythtv/libs/libmythui/mythgenerictree.cpp
@@ -164,6 +164,9 @@ void MythGenericTree::DetachParent(void)
void MythGenericTree::removeNode(MythGenericTree *child)
{
+ if (!child)
+ return;
+
if (m_selected_subnode == child)
m_selected_subnode = NULL;

0 comments on commit 46bcb72

Please sign in to comment.