[empathy] show_borders: check if video_output still exists before using it



commit 8049ff3dad3ea95b56a3be923ca5a51370d9cc82
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu Sep 16 13:38:56 2010 +0200

    show_borders: check if video_output still exists before using it

 src/empathy-call-window.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 4e7e31c..476bce5 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -2930,10 +2930,15 @@ show_borders (EmpathyCallWindow *window, gboolean set_fullscreen)
       set_fullscreen ? 0 : CONTENT_HBOX_BORDER_WIDTH);
   gtk_box_set_spacing (GTK_BOX (priv->content_hbox),
       set_fullscreen ? 0 : CONTENT_HBOX_SPACING);
-  gtk_box_set_child_packing (GTK_BOX (priv->content_hbox),
-      priv->video_output, TRUE, TRUE,
-      set_fullscreen ? 0 : CONTENT_HBOX_CHILDREN_PACKING_PADDING,
-      GTK_PACK_START);
+
+  if (priv->video_output != NULL)
+    {
+      gtk_box_set_child_packing (GTK_BOX (priv->content_hbox),
+          priv->video_output, TRUE, TRUE,
+          set_fullscreen ? 0 : CONTENT_HBOX_CHILDREN_PACKING_PADDING,
+          GTK_PACK_START);
+    }
+
   gtk_box_set_child_packing (GTK_BOX (priv->content_hbox),
       priv->vbox, TRUE, TRUE,
       set_fullscreen ? 0 : CONTENT_HBOX_CHILDREN_PACKING_PADDING,



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