[libbluray-devel] Fixed _user_input() when enabled button for bog is not found.

hpi1 git at videolan.org
Fri Apr 22 10:34:32 CEST 2011


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Apr 22 11:17:15 2011 +0300| [b2cfdd0baffbca8555ba6b1ad4ca5206a6c8aead] | committer: hpi1

Fixed _user_input() when enabled button for bog is not found.
(Fixes "All-Star Superman" special features menu)

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

 src/libbluray/decoders/graphics_controller.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/libbluray/decoders/graphics_controller.c b/src/libbluray/decoders/graphics_controller.c
index 8c949c5..afc958f 100644
--- a/src/libbluray/decoders/graphics_controller.c
+++ b/src/libbluray/decoders/graphics_controller.c
@@ -533,9 +533,12 @@ static int _user_input(GRAPHICS_CONTROLLER *gc, bd_vk_key_e key, GC_NAV_CMDS *cm
     for (ii = 0; ii < page->num_bogs; ii++) {
         BD_IG_BOG *bog      = &page->bog[ii];
         unsigned   valid_id = gc->enabled_button[ii];
+        BD_IG_BUTTON *button = _find_button_bog(bog, valid_id);
+        if (!button) {
+            continue;
+        }
 
         if (VK_IS_CURSOR(key) || key == BD_VK_ENTER) {
-            BD_IG_BUTTON *button = _find_button_bog(bog, valid_id);
             if (button->id == cur_btn_id) {
                 switch(key) {
                     case BD_VK_UP:



More information about the libbluray-devel mailing list