Fix dereference of null pointer

Bug found by Coccinelle with 'isnull.cocci' script (Dereference of an
expression that has been checked to be NULL) [1].

[1] http://www.emn.fr/x-info/coccinelle/rules/isnull.html



SVN revision: 50210
This commit is contained in:
Lucas De Marchi 2010-07-13 02:01:52 +00:00
parent e2c8e29aa8
commit 51429ba1ec
1 changed files with 4 additions and 2 deletions

View File

@ -158,7 +158,7 @@ static Eina_Bool
_signal_clock_val_up(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
if (!wd) goto clock_val_up_cancel;
if (!wd) goto clock_val_up_exit_on_error;
if (!wd->edit) goto clock_val_up_cancel;
if (!wd->sel_obj) goto clock_val_up_cancel;
if (wd->sel_obj == wd->digit[0])
@ -203,6 +203,7 @@ _signal_clock_val_up(void *data)
return ECORE_CALLBACK_RENEW;
clock_val_up_cancel:
wd->spin = NULL;
clock_val_up_exit_on_error:
return ECORE_CALLBACK_CANCEL;
}
@ -210,7 +211,7 @@ static Eina_Bool
_signal_clock_val_down(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
if (!wd) goto clock_val_down_cancel;
if (!wd) goto clock_val_up_exit_on_error;
if (!wd->edit) goto clock_val_down_cancel;
if (!wd->sel_obj) goto clock_val_down_cancel;
if (wd->sel_obj == wd->digit[0])
@ -255,6 +256,7 @@ _signal_clock_val_down(void *data)
return ECORE_CALLBACK_RENEW;
clock_val_down_cancel:
wd->spin = NULL;
clock_val_down_exit_on_error:
return ECORE_CALLBACK_CANCEL;
}