[libchamplain] Make sure the number of loading tiles in ChamplainView doesn't drop below 0



commit e0740ffe4f7f8310067e2e4631997660c4d7bffe
Author: JiÅ?í Techet <techet gmail com>
Date:   Wed Aug 25 21:56:51 2010 +0200

    Make sure the number of loading tiles in ChamplainView doesn't drop below 0
    
    Signed-off-by: JiÅ?í Techet <techet gmail com>

 champlain/champlain-view.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index 9a445a5..fb44df0 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -2723,7 +2723,8 @@ tile_state_notify (ChamplainTile *tile,
     }
   else if (tile_state == CHAMPLAIN_STATE_DONE)
     {
-      priv->tiles_loading--;
+      if (priv->tiles_loading > 0)
+        priv->tiles_loading--;
       if (priv->tiles_loading == 0)
         {
           priv->state = CHAMPLAIN_STATE_DONE;



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