* dlg.c (add_widget): Check for what is not NULL

before everything else.
This commit is contained in:
Andrew V. Samoilov 2001-11-07 12:15:11 +00:00
parent 51b1972843
commit 35db7bf645
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2001-11-07 Andrew V. Samoilov <kai@cmail.ru>
* dlg.c (add_widget): Check for what is not NULL
before everything else.
2001-10-29 Andrew V. Samoilov <kai@cmail.ru>
* charsets.c (load_codepages_list): Use glib memory allocation

View File

@ -233,14 +233,14 @@ int add_widget (Dlg_head *where, void *what)
Widget_Item *back;
Widget *widget = (Widget *) what;
/* Only used by Tk */
widget->frame = the_frame;
/* Don't accept 0 widgets, this could be from widgets that could not */
/* initialize properly */
if (!what)
return 0;
/* Only used by Tk */
widget->frame = the_frame;
widget->x += where->x;
widget->y += where->y;