[libchamplain] view: Set world_bbox to NULL in dispose
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] view: Set world_bbox to NULL in dispose
- Date: Sun, 30 Aug 2015 23:32:27 +0000 (UTC)
commit cf42830731b5f7b58733b0057cb0ffd02700ea73
Author: Jiří Techet <techet gmail com>
Date: Mon Aug 31 01:26:23 2015 +0200
view: Set world_bbox to NULL in dispose
Prevents double-free as dispose can be called multiple times.
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]