[empathy] CallWindow: don't spit unnecessary criticals



commit 5cdfd1e0d6c5df35f07530b9cdcdbd6c74d33247
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date:   Tue Aug 30 10:37:29 2011 +0100

    CallWindow: don't spit unnecessary criticals
    
    There's no guarantee that an actor has an allocation all the time,
    so gracefully handle the case when it doesn't.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656911

 src/empathy-call-window.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 0fd81ee..dac9b64 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -707,8 +707,8 @@ empathy_call_window_get_preview_position (EmpathyCallWindow *self,
   ClutterGeometry box;
   PreviewPosition pos = PREVIEW_POS_NONE;
 
-  g_return_val_if_fail (clutter_actor_has_allocation (self->priv->video_box),
-      pos);
+  if (!clutter_actor_has_allocation (self->priv->video_box))
+    return pos;
 
   clutter_actor_get_geometry (self->priv->video_box, &box);
 



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