]> err.no Git - libchamplain/commitdiff
Fix Bug 575902: ChamplainNetworkMapSource crashes when setting "proxy-uri"
authorEmmanuel Rodriguez <emmanuel.rodriguez@gmail.com>
Thu, 19 Mar 2009 06:25:48 +0000 (08:25 +0200)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Thu, 19 Mar 2009 06:25:48 +0000 (08:25 +0200)
champlain/champlain-network-map-source.c

index bad816589cb2b46cc410b4d59433ff62de391429..e335d37a86e16d89eaa5b73e9586068ce0a4e53b 100644 (file)
@@ -114,8 +114,7 @@ champlain_network_map_source_set_property (GObject *object,
         priv->offline = g_value_get_boolean (value);
         break;
       case PROP_PROXY_URI:
-        if (priv->proxy_uri)
-          g_free (priv->proxy_uri);
+        g_free (priv->proxy_uri);
 
         priv->proxy_uri = g_value_dup_string (value);
         if (soup_session)
@@ -130,9 +129,11 @@ champlain_network_map_source_set_property (GObject *object,
 static void
 champlain_network_map_source_finalize (GObject *object)
 {
-  /* ChamplainNetworkMapSource *network_map_source = CHAMPLAIN_NETWORK_MAP_SOURCE (object);
-   * ChamplainNetworkMapSourcePrivate *priv = GET_PRIVATE (network_map_source);
-   */
+  ChamplainNetworkMapSource *network_map_source = CHAMPLAIN_NETWORK_MAP_SOURCE (object);
+  ChamplainNetworkMapSourcePrivate *priv = GET_PRIVATE (network_map_source);
+  
+  g_free (priv->proxy_uri);
+  g_free (priv->uri_format);
 
   G_OBJECT_CLASS (champlain_network_map_source_parent_class)->finalize (object);
 }
@@ -200,7 +201,8 @@ champlain_network_map_source_init (ChamplainNetworkMapSource *champlainMapSource
 {
   ChamplainNetworkMapSourcePrivate *priv = GET_PRIVATE (champlainMapSource);
 
-  priv->proxy_uri = "";
+  priv->proxy_uri = g_strdup ("");
+  priv->uri_format = NULL;
 }
 
 ChamplainNetworkMapSource*