set an exception if we fail, so evo won't crash.

* gui/calendar-component.c (impl_createControls): set an exception
	if we fail, so evo won't crash.

svn path=/trunk/; revision=23121
This commit is contained in:
Dan Winship
2003-10-29 17:53:47 +00:00
parent 464b8503fe
commit 7a7f61dfde
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2003-10-29 Dan Winship <danw@ximian.com>
* gui/calendar-component.c (impl_createControls): set an exception
if we fail, so evo won't crash.
2003-10-29 <jpr@ximian.com> 2003-10-29 <jpr@ximian.com>
* gui/dialogs/cal-prefs-dialog.c (update_config): no need to * gui/dialogs/cal-prefs-dialog.c (update_config): no need to

View File

@ -276,6 +276,9 @@ impl_createControls (PortableServer_Servant servant,
priv->calendar = GNOME_CALENDAR (gnome_calendar_new ()); priv->calendar = GNOME_CALENDAR (gnome_calendar_new ());
if (!priv->calendar) { if (!priv->calendar) {
g_warning (G_STRLOC ": could not create the calendar widget!"); g_warning (G_STRLOC ": could not create the calendar widget!");
CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
ex_GNOME_Evolution_Component_Failed,
NULL);
return; return;
} }
@ -284,6 +287,9 @@ impl_createControls (PortableServer_Servant servant,
view_control = bonobo_control_new (GTK_WIDGET (priv->calendar)); view_control = bonobo_control_new (GTK_WIDGET (priv->calendar));
if (!view_control) { if (!view_control) {
g_warning (G_STRLOC ": could not create the control!"); g_warning (G_STRLOC ": could not create the control!");
CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
ex_GNOME_Evolution_Component_Failed,
NULL);
return; return;
} }
g_object_set_data (G_OBJECT (priv->calendar), "control", view_control); g_object_set_data (G_OBJECT (priv->calendar), "control", view_control);