[libgd] stack: do not try to move a null window



commit a41ba8f4c924694f50b89bec0b2818de01ab65ba
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Mon Mar 18 10:01:59 2013 +0100

    stack: do not try to move a null window

 libgd/gd-stack.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/libgd/gd-stack.c b/libgd/gd-stack.c
index 7606d96..14e6628 100644
--- a/libgd/gd-stack.c
+++ b/libgd/gd-stack.c
@@ -603,15 +603,16 @@ gd_stack_set_transition_position (GdStack *stack,
                                   gdouble pos)
 {
   GdStackPrivate *priv = stack->priv;
-  GtkAllocation allocation;
   gboolean done;
 
   priv->transition_pos = pos;
   gtk_widget_queue_draw (GTK_WIDGET (stack));
 
-  if (priv->transition_type == GD_STACK_TRANSITION_TYPE_SLIDE_LEFT ||
-      priv->transition_type == GD_STACK_TRANSITION_TYPE_SLIDE_RIGHT)
+  if (priv->bin_window != NULL &&
+      (priv->transition_type == GD_STACK_TRANSITION_TYPE_SLIDE_LEFT ||
+       priv->transition_type == GD_STACK_TRANSITION_TYPE_SLIDE_RIGHT))
     {
+      GtkAllocation allocation;
       gtk_widget_get_allocation (GTK_WIDGET (stack), &allocation);
       gdk_window_move (priv->bin_window,
                        get_bin_window_x (stack, &allocation), 0);


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