Am Montag, den 07.11.2011, 15:43 +0100 schrieb Hans de Goede:
> AFAIK you may only call g_clear_object on non NULL GObject pointers,
> and if the matching foo_get was never called, it will be NULL, so
> I believe this should be:
> 
>      if (s->audio_manager)
>          g_clear_object(&s->audio_manager);
>      if (s->gtk_session)
>          g_clear_object(&s->gtk_session);
>      if (s->usb_manager)
>          g_clear_object(&s->usb_manager);
> 

If I understand
http://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#g-clear-object
 correctly, object_ptr must not be null (for example &s->audio_manager), but 
the reference itself (for example s->audio_manager) may be NULL in which case 
the function g_clear_object does nothing.

Cheers,
Tiziano

-- 
stepping stone GmbH
Neufeldstrasse 9
CH-3012 Bern

Telefon: +41 31 332 53 63
www.stepping-stone.ch
tiziano.muel...@stepping-stone.ch

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to