[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [PATCH virt-viewer 12/19] Prevent from adding the same display several time in the session



How can this happen?

Christophe

On Mon, Jul 16, 2012 at 06:57:47PM +0200, Marc-André Lureau wrote:
> ---
>  src/virt-viewer-session.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/virt-viewer-session.c b/src/virt-viewer-session.c
> index 18b6922..9249a1f 100644
> --- a/src/virt-viewer-session.c
> +++ b/src/virt-viewer-session.c
> @@ -282,6 +282,9 @@ virt_viewer_session_new(void)
>  void virt_viewer_session_add_display(VirtViewerSession *session,
>                                       VirtViewerDisplay *display)
>  {
> +    if (g_list_find(session->priv->displays, display))
> +        return;
> +
>      session->priv->displays = g_list_append(session->priv->displays, display);
>      g_object_ref(display);
>      g_signal_emit_by_name(session, "session-display-added", display);
> -- 
> 1.7.10.4
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list redhat com
> https://www.redhat.com/mailman/listinfo/virt-tools-list

Attachment: pgpOiSMw8Ij9T.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]