[libbluray-devel] mobj_dump: print error message on read/parse failure
hpi1
git at videolan.org
Wed Aug 30 08:52:56 CEST 2017
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Aug 28 18:08:07 2017 +0300| [e174992addf6fe8cc4e6108d50e775790c257d99] | committer: hpi1
mobj_dump: print error message on read/parse failure
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=e174992addf6fe8cc4e6108d50e775790c257d99
---
src/devtools/mobj_dump.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/devtools/mobj_dump.c b/src/devtools/mobj_dump.c
index 68e78dd4..7c464d1e 100644
--- a/src/devtools/mobj_dump.c
+++ b/src/devtools/mobj_dump.c
@@ -73,11 +73,14 @@ int main(int argc, const char *argv[])
mobj = bd_read_mobj(argv[argc-1]);
- if (mobj) {
- _mobj_print(mobj, disasm);
-
- bd_free_mobj(mobj);
+ if (!mobj) {
+ fprintf(stderr, "Error loading %s\n", argv[argc-1]);
+ return 1;
}
+ _mobj_print(mobj, disasm);
+
+ bd_free_mobj(mobj);
+
return 0;
}
More information about the libbluray-devel
mailing list