diff options
-rw-r--r-- | src/windows/identity/uilib/action.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/windows/identity/uilib/action.c b/src/windows/identity/uilib/action.c index a47683171b..04fb52a849 100644 --- a/src/windows/identity/uilib/action.c +++ b/src/windows/identity/uilib/action.c @@ -796,16 +796,18 @@ khui_find_menu(khm_int32 id) { KHMEXP khui_action * KHMAPI khui_find_action(khm_int32 id) { - khui_action * act; + khui_action * act = NULL; int i; - act = khui_actions; - for(i=0;i<khui_n_actions;i++) { - if(act[i].cmd == id) - return &act[i]; - } + if (id < KHUI_USERACTION_BASE) { + act = khui_actions; + for(i=0;i<khui_n_actions;i++) { + if(act[i].cmd == id) + return &act[i]; + } - act = NULL; + return NULL; + } EnterCriticalSection(&cs_actions); if (id >= KHUI_USERACTION_BASE && |