Re: bonobo_widget_new_subdoc error checking
- From: Miguel de Icaza <miguel helixcode com>
- To: Dan Winship <danw helixcode com>
- Cc: gnome-components-list gnome org
- Subject: Re: bonobo_widget_new_subdoc error checking
- Date: 30 Apr 2000 07:35:56 -0400
> bonobo_widget_new_subdoc doesn't check if it succesfully launched the
> component or not, which causes lots of g_warnings before something
> finally manages to clean up after it when it doesn't. This fixes it.
I think this is actually covering up for a worst problem.
That routine should actually return either the object, or NULL on
failure, and the caller function should check for that and clean up
for it as well:
In bonobo_widget_new_subdoc():
if (bonobo_widget_create_subdoc_object (bw, object_desc, uih) == NULL){
gtk_object_destroy (GTK_OBJECT (bw));
return NULL;
}
And the routine bonobo_widget_create_subdoc_object should read:
if (bw->priv->server == NULL)
return NULL;
And I just found a lot of leakage in there as well.
Mhm. Better let me fix it now.
Miguel.
[
Date Prev][Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]