Commit c0c55695 authored by hpi1's avatar hpi1

Fix possible crash in bd_start_bdj()

parent 008d084e
......@@ -2618,10 +2618,12 @@ int bd_start_bdj(BLURAY *bd, const char *start_object)
}
/* valid BD-J title from disc index ? */
for (ii = 0; ii <= bd->disc_info.num_titles; ii++) {
t = bd->disc_info.titles[ii];
if (t && t->bdj && t->id_ref == title_num) {
return _start_bdj(bd, ii);
if (bd->disc_info.titles) {
for (ii = 0; ii <= bd->disc_info.num_titles; ii++) {
t = bd->disc_info.titles[ii];
if (t && t->bdj && t->id_ref == title_num) {
return _start_bdj(bd, ii);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment