mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
(buttonbar_call): fix possible NULL dereference.
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
This commit is contained in:
parent
d2cfb712b0
commit
bf5abff937
@ -149,10 +149,11 @@ buttonbar_call (WButtonBar * bb, int i)
|
||||
Widget *w = WIDGET (bb);
|
||||
Widget *target;
|
||||
|
||||
target = (bb->labels[i].receiver != NULL) ? bb->labels[i].receiver : WIDGET (w->owner);
|
||||
|
||||
if ((bb != NULL) && (bb->labels[i].command != CK_IgnoreKey))
|
||||
{
|
||||
target = (bb->labels[i].receiver != NULL) ? bb->labels[i].receiver : WIDGET (w->owner);
|
||||
ret = send_message (target, w, MSG_ACTION, bb->labels[i].command, NULL);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user