Permalink
Browse files

Video Library: Avoid crashing if child item no longer exists.

Check validity of child metadata before attempting to play it.

Refs #10176.
  • Loading branch information...
1 parent 3bb4bef commit 2472d67085b25bedcee1cedbf2b5f9111384e48f Robert McNamara committed Dec 30, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 mythtv/programs/mythfrontend/videodlg.cpp
@@ -270,8 +270,8 @@ namespace
else
VideoPlayerCommand::PlayerFor(item.get()).Play();
- if (item->GetChildID() > 0)
- item = video_list.byID(item->GetChildID());
+ if (item->GetChildID() > 0 && video_list.byID(item->GetChildID()))
+ item = video_list.byID(item->GetChildID());
else
break;
}

0 comments on commit 2472d67

Please sign in to comment.