diff options
author | Xan Lopez <xlopez@igalia.com> | 2011-05-22 19:16:25 +0800 |
---|---|---|
committer | Xan Lopez <xlopez@igalia.com> | 2011-05-22 19:16:25 +0800 |
commit | 243e5e4985626aa44bfd0b74d17c478a4402e851 (patch) | |
tree | 577a2e80e03473d667163e549ec2f12e70f7f5d2 /lib | |
parent | fb5aebd75337d9602de157670300e0a4a3473b91 (diff) | |
download | gsoc2013-epiphany-243e5e4985626aa44bfd0b74d17c478a4402e851.tar.gz gsoc2013-epiphany-243e5e4985626aa44bfd0b74d17c478a4402e851.tar.zst gsoc2013-epiphany-243e5e4985626aa44bfd0b74d17c478a4402e851.zip |
ephy-location-entry: handle gracefully first call
The set_stock_id method is called initially with NULL to set things
up.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/widgets/ephy-location-entry.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c index e321deff3..79c921fcb 100644 --- a/lib/widgets/ephy-location-entry.c +++ b/lib/widgets/ephy-location-entry.c @@ -1563,11 +1563,11 @@ ephy_location_entry_set_lock_stock (EphyLocationEntry *entry, EphyLocationEntryPrivate *priv; g_return_if_fail (EPHY_IS_LOCATION_ENTRY (entry)); - g_return_if_fail (stock_id); priv = entry->priv; - g_object_unref (priv->lock_gicon); + if (priv->lock_gicon) + g_object_unref (priv->lock_gicon); /* At the moment we basically only show two kinds of * locks. Full/green for secure sites, Broken/red for sites @@ -1575,7 +1575,7 @@ ephy_location_entry_set_lock_stock (EphyLocationEntry *entry, * their security infrastructure (broken cert, etc). For * everything else, nothing is shown. */ - if (g_str_equal (stock_id, STOCK_LOCK_BROKEN)) + if (!stock_id || g_str_equal (stock_id, STOCK_LOCK_BROKEN)) priv->lock_gicon = g_themed_icon_new_with_default_fallbacks ("changes-allow-symbolic"); else priv->lock_gicon = g_themed_icon_new_with_default_fallbacks ("changes-prevent-symbolic"); |