Skip to content

Commit

Permalink
Video Library: Avoid crashing if child item no longer exists.
Browse files Browse the repository at this point in the history
Check validity of child metadata before attempting to play it.

Refs #10176.
  • Loading branch information
Robert McNamara committed Dec 30, 2011
1 parent 3bb4bef commit 2472d67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythtv/programs/mythfrontend/videodlg.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2472d67

Please sign in to comment.