diff options
author | Quentin Glidic <sardemff7+git@sardemff7.net> | 2017-05-30 13:40:03 +0200 |
---|---|---|
committer | Quentin Glidic <sardemff7+git@sardemff7.net> | 2017-05-30 13:45:20 +0200 |
commit | 4e448eac45188079028e03577bb45dce624ffd9c (patch) | |
tree | bf1c3ed2cd1831eac73756a2f3edfc34a08e81a2 /source/widgets/widget.c | |
parent | c68dc38c362dcbb69728b92856fd0e48f1fe8500 (diff) |
widget.test: Add NULL tests for trigger_action functions
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'source/widgets/widget.c')
-rw-r--r-- | source/widgets/widget.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/widgets/widget.c b/source/widgets/widget.c index 353ab754..2638c0e2 100644 --- a/source/widgets/widget.c +++ b/source/widgets/widget.c @@ -463,6 +463,9 @@ WidgetTriggerActionResult widget_trigger_action ( widget *wid, guint action, gin void widget_set_trigger_action_handler ( widget *wid, widget_trigger_action_cb cb, void * cb_data ) { + if ( wid == NULL ) { + return; + } wid->trigger_action = cb; wid->trigger_action_cb_data = cb_data; } |