diff options
author | Jiří Techet <techet@gmail.com> | 2015-08-31 01:26:23 +0200 |
---|---|---|
committer | Jiří Techet <techet@gmail.com> | 2015-08-31 01:26:23 +0200 |
commit | cf42830731b5f7b58733b0057cb0ffd02700ea73 (patch) | |
tree | 12413a22db54c07aaa74b61133ca6ffe9222d27f | |
parent | 7bfaa264954489a0e9a93bbad9a364a990c5b93a (diff) | |
download | libchamplain-cf42830731b5f7b58733b0057cb0ffd02700ea73.tar.gz |
view: Set world_bbox to NULL in dispose
Prevents double-free as dispose can be called multiple times.
-rw-r--r-- | champlain/champlain-view.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c index 36da9c0..48df08c 100644 --- a/champlain/champlain-view.c +++ b/champlain/champlain-view.c @@ -699,7 +699,10 @@ champlain_view_dispose (GObject *object) priv->zoom_layer = NULL; if (priv->world_bbox) - champlain_bounding_box_free (priv->world_bbox); + { + champlain_bounding_box_free (priv->world_bbox); + priv->world_bbox = NULL; + } G_OBJECT_CLASS (champlain_view_parent_class)->dispose (object); } |