[libbluray-devel] Check for NULL
hpi1
git at videolan.org
Mon Feb 8 10:55:06 CET 2016
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Feb 8 11:52:09 2016 +0200| [ee38a0fdb4227a1d8c2c8da8b123ea5fe8172274] | committer: hpi1
Check for NULL
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=ee38a0fdb4227a1d8c2c8da8b123ea5fe8172274
---
src/libbluray/bluray.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 5ca254b..2164a23 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -2539,6 +2539,9 @@ uint32_t bd_get_titles(BLURAY *bd, uint8_t flags, uint32_t min_title_length)
int bd_get_main_title(BLURAY *bd)
{
+ if (!bd) {
+ return -1;
+ }
if (bd->title_type != title_undef) {
BD_DEBUG(DBG_CRIT | DBG_BLURAY, "bd_get_main_title() can't be used with BluRay menus\n");
}
More information about the libbluray-devel
mailing list