If we fail to create a widget, print a warning and return instead of

2001-08-29  Lutz Mller  <urc8@rz.uni-karlsruhe.de>

        * eog-window.c (add_control_to_ui): If we fail to create a widget,
        print a warning and return instead of continuing (and crashing).
This commit is contained in:
Lutz Mller 2001-08-29 15:20:15 +00:00 committed by Lutz Müller
parent 44376b602d
commit 6d84ba09dc
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2001-08-29 Lutz Müller <urc8@rz.uni-karlsruhe.de>
* eog-window.c (add_control_to_ui): If we fail to create a widget,
print a warning and return instead of continuing (and crashing).
2001-08-16 jacob berkman <jacob@ximian.com>
* eog-window.c: update file sel stuff to new api

View file

@ -1243,6 +1243,10 @@ add_control_to_ui (EogWindow *window, Bonobo_Control control)
/* Show the new control */
priv->widget = bonobo_widget_new_control_from_objref
(control, priv->ui_container);
if (!priv->widget) {
g_warning ("Could not create a widget from the control!");
return;
}
gtk_container_add (GTK_CONTAINER (priv->box), priv->widget);
gtk_widget_show (priv->widget);