[libegg/spread-table-dnd: 75/78] Added error checking to EggPlaceholder



commit 5e673521394d497b866392f65155012b5256f08f
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sat Apr 9 20:41:02 2011 +0900

    Added error checking to EggPlaceholder

 libegg/spreadtable/eggplaceholder.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libegg/spreadtable/eggplaceholder.c b/libegg/spreadtable/eggplaceholder.c
index 452e764..05e072d 100644
--- a/libegg/spreadtable/eggplaceholder.c
+++ b/libegg/spreadtable/eggplaceholder.c
@@ -121,8 +121,10 @@ placeholder_animate (EggPlaceholder *placeholder)
 {
   if (placeholder->priv->animation_direction == EGG_PLACEHOLDER_ANIM_IN)
     placeholder->priv->animation_percent += ANIMATION_STEP;
-  else
+  else if (placeholder->priv->animation_direction == EGG_PLACEHOLDER_ANIM_OUT)
     placeholder->priv->animation_percent -= ANIMATION_STEP;
+  else
+    g_error ("Placeholder animation called while not animating");
 
   placeholder->priv->animation_percent =
     CLAMP (placeholder->priv->animation_percent, 0.0, 1.0);



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