summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert McNamara <rmcnamara@mythtv.org>2011-12-30 03:19:16 (GMT)
committer Robert McNamara <rmcnamara@mythtv.org>2011-12-30 03:19:16 (GMT)
commit2472d67085b25bedcee1cedbf2b5f9111384e48f (patch)
tree638651a228be114c564bb1f3205036b13e1b9b40
parent3bb4bef20ccd81e23be182dbf3bb4db0e8bbd0f6 (diff)
Video Library: Avoid crashing if child item no longer exists.
Check validity of child metadata before attempting to play it. Refs #10176.
-rw-r--r--mythtv/programs/mythfrontend/videodlg.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mythtv/programs/mythfrontend/videodlg.cpp b/mythtv/programs/mythfrontend/videodlg.cpp
index b7e497d..f50e7ce 100644
--- a/mythtv/programs/mythfrontend/videodlg.cpp
+++ b/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;
}