[libbluray-devel] commit: gc_run(): check if GC_NAV_CMDS *cmds is NULL before writing to it ( hpi1 )
git at videolan.org
git at videolan.org
Mon Oct 25 11:53:42 CEST 2010
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Oct 25 12:53:28 2010 +0300| [ab7a991bb3d21ef2d1a356eb32571f92d4c95023] | committer: hpi1
gc_run(): check if GC_NAV_CMDS *cmds is NULL before writing to it
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=ab7a991bb3d21ef2d1a356eb32571f92d4c95023
---
src/libbluray/decoders/graphics_controller.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/libbluray/decoders/graphics_controller.c b/src/libbluray/decoders/graphics_controller.c
index 4e7817f..6401a48 100644
--- a/src/libbluray/decoders/graphics_controller.c
+++ b/src/libbluray/decoders/graphics_controller.c
@@ -499,9 +499,11 @@ static void _set_button_page(GRAPHICS_CONTROLLER *gc, uint32_t param, GC_NAV_CMD
void gc_run(GRAPHICS_CONTROLLER *gc, gc_ctrl_e ctrl, uint32_t param, GC_NAV_CMDS *cmds)
{
- cmds->num_nav_cmds = 0;
- cmds->nav_cmds = NULL;
- cmds->sound_id_ref = -1;
+ if (cmds) {
+ cmds->num_nav_cmds = 0;
+ cmds->nav_cmds = NULL;
+ cmds->sound_id_ref = -1;
+ }
if (!gc || !gc->igs || !gc->igs->ics) {
ERROR("gc_run(): no interactive composition\n");
More information about the libbluray-devel
mailing list