[libchamplain] ChamplainView: Sink initial MapSource reference
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] ChamplainView: Sink initial MapSource reference
- Date: Tue, 22 Apr 2014 18:58:50 +0000 (UTC)
commit cf6530cbdf7b76e84c7216293699664baf690dbd
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Sat Apr 19 23:45:45 2014 +0200
ChamplainView: Sink initial MapSource reference
We need to call g_object_ref_sink on the initial MapSource otherwise
we will call g_object_unref on a floating reference when a new
MapSource is set.
https://bugzilla.gnome.org/show_bug.cgi?id=728337
champlain/champlain-view.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index f9e4059..a57f047 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -1106,7 +1106,7 @@ champlain_view_init (ChamplainView *view)
factory = champlain_map_source_factory_dup_default ();
source = champlain_map_source_factory_create_cached_source (factory, CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK);
- priv->map_source = CHAMPLAIN_MAP_SOURCE (source);
+ priv->map_source = CHAMPLAIN_MAP_SOURCE (g_object_ref_sink (source));
priv->zoom_level = 0;
priv->min_zoom_level = champlain_map_source_get_min_zoom_level (priv->map_source);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]