From a2f561ae50fc74eed94f6eb7d9102c74caab8b49 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Thu, 14 Jan 2010 23:11:39 +0200 Subject: Make EphyLocationEntry store a copy of the lock-stock-id Otherwise we rely on the ordering of the property notifications to get a proper id instead of garbage (!). Bug #606995 --- lib/widgets/ephy-location-entry.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/widgets') diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c index 217aa80e2..f36b3346d 100644 --- a/lib/widgets/ephy-location-entry.c +++ b/lib/widgets/ephy-location-entry.c @@ -194,6 +194,7 @@ ephy_location_entry_finalize (GObject *object) EphyLocationEntryPrivate *priv = entry->priv; g_free (priv->saved_text); + g_free (priv->lock_stock_id); if (priv->favicon != NULL) { @@ -1635,7 +1636,7 @@ ephy_location_entry_set_lock_stock (EphyLocationEntry *entry, { g_return_if_fail (EPHY_IS_LOCATION_ENTRY (entry)); - entry->priv->lock_stock_id = (char*)stock_id; + entry->priv->lock_stock_id = g_strdup (stock_id); if (entry->priv->show_lock) gtk_entry_set_icon_from_stock (GTK_ENTRY (entry->priv->entry), -- cgit v1.2.3