Commit d942c39c authored by Dmitry Antipov's avatar Dmitry Antipov

Avoid yet another possible NULL pointer dereference found by GCC 6.1.1

* lwlib/lwlib.c (lw_get_all_values): Always check the value returned by
get_widget_info.
parent 55e4e83c
......@@ -1042,11 +1042,13 @@ widget_value*
lw_get_all_values (LWLIB_ID id)
{
widget_info* info = get_widget_info (id, False);
widget_value* val = info->val;
if (lw_get_some_values (id, val))
return val;
else
return NULL;
if (info)
{
widget_value* val = info->val;
if (lw_get_some_values (id, val))
return val;
}
return NULL;
}
/* internal function used by the library dependent implementation to get the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment