[libbluray-devel] bd_close(): allow NULL pointer

hpi1 git at videolan.org
Sun Aug 7 15:57:27 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun Aug  7 16:54:24 2016 +0300| [bd330eecf890903250e97555f92954ea1a4c1510] | committer: hpi1

bd_close(): allow NULL pointer

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=bd330eecf890903250e97555f92954ea1a4c1510
---

 src/libbluray/bluray.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 36e9fac..50bad8f 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -1503,6 +1503,10 @@ BLURAY *bd_open(const char *device_path, const char *keyfile_path)
 
 void bd_close(BLURAY *bd)
 {
+    if (!bd) {
+        return;
+    }
+
     _close_bdj(bd);
 
     _close_m2ts(&bd->st0);



More information about the libbluray-devel mailing list