[libchamplain] Fix warnings in create-destroy-test demo



commit 04a14933d9ecfa407aeb41f2767e48873a18b8ed
Author: Jiří Techet <techet gmail com>
Date:   Sat Feb 2 19:27:08 2019 +0100

    Fix warnings in create-destroy-test demo
    
    Call tile_in_tile_table() after map_source is checked. When ChamplainView
    is destroyed data->map_source != priv->map_source so tile_in_tile_table()
    won't get called and won't emit warnings.

 champlain/champlain-view.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index ccbc5d3..e707aae 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -2766,9 +2766,9 @@ fill_tile_cb (FillTileCallbackData *data)
   gint size = data->size;
   gint zoom_level = data->zoom_level;
 
-  if (!tile_in_tile_table (view, priv->tile_map, x, y) &&
-      zoom_level == priv->zoom_level &&
+  if (zoom_level == priv->zoom_level &&
       data->map_source == priv->map_source &&
+      !tile_in_tile_table (view, priv->tile_map, x, y) &&
       tile_in_tile_table (view, priv->visible_tiles, x, y))
     {
       GList *iter;


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