[virt-tools-list] [virt-viewer v2 2/4] timed-revealer: Don't release reference we don't own

Fabiano Fidêncio fidencio at redhat.com
Tue Jun 28 15:32:48 UTC 2016


On Tue, Jun 28, 2016 at 5:23 PM, Fabiano Fidêncio <fidencio at redhat.com> wrote:
> From: Christophe Fergeau <cfergeau at redhat.com>
>
> VirtViewerTimedRevealer::evBox is created in
> virt_viewer_timed_revealer_new() and will be passed to
> gtk_container_add() through gtk_overlay_add_overlay(overlay,
> virt_viewer_timed_revealer_get_overlay_widget(priv->revealer))
>
> This means VirtViewerTimedRevealer does not own a reference on evBox,
> and that it should not try to release it in
> VirtViewerTimedRevealer::dispose()
> ---
>  src/virt-viewer-timed-revealer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/virt-viewer-timed-revealer.c b/src/virt-viewer-timed-revealer.c
> index cad9ede..61b2d20 100644
> --- a/src/virt-viewer-timed-revealer.c
> +++ b/src/virt-viewer-timed-revealer.c
> @@ -125,7 +125,7 @@ virt_viewer_timed_revealer_dispose(GObject *object)
>      VirtViewerTimedRevealer *self = VIRT_VIEWER_TIMED_REVEALER(object);
>      VirtViewerTimedRevealerPrivate *priv = self->priv;
>
> -    g_clear_object(&priv->evBox);
> +    priv->evBox = NULL;
>      priv->revealer = NULL;
>
>      if (priv->timeout_id) {
> --
> 2.7.4
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list

Acked-by: Fabiano Fidêncio <fidencio at redhat.com>




More information about the virt-tools-list mailing list