[libchamplain: 39/45] Enable get_map_size in champlain_path_layer to return the sizes separately.



commit 34eb2bb4b0db0a0ae7c965d23de52bd1651ca04d
Author: Marius Stanciu <stanciumarius94 gmail com>
Date:   Mon Aug 8 18:27:44 2016 +0300

    Enable get_map_size in champlain_path_layer to return the sizes separately.

 champlain/champlain-path-layer.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/champlain/champlain-path-layer.c b/champlain/champlain-path-layer.c
index 72cc613..dc3baf8 100644
--- a/champlain/champlain-path-layer.c
+++ b/champlain/champlain-path-layer.c
@@ -520,8 +520,11 @@ get_map_size (ChamplainView *view, gint *width, gint *height)
                                                 zoom_level);
   cols = champlain_map_source_get_column_count (map_source,
                                                 zoom_level);
-  *width = size * rows;
-  *height = size * cols;
+  if (width)
+    *width = size * rows;
+
+  if (height)
+    *height = size * cols;
 }
 
 


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