From 2d11419cba100678928df71bf9b7b19d48e627b4 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Wed, 14 Jan 2009 12:10:23 +0100 Subject: [PATCH] SGPropertyNode must increment / decrement the reference counter in an aliased node. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit From Csaba Halász. --- simgear/props/props.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/simgear/props/props.cxx b/simgear/props/props.cxx index 48b1d2c9..f73e773e 100644 --- a/simgear/props/props.cxx +++ b/simgear/props/props.cxx @@ -477,6 +477,7 @@ SGPropertyNode::clearValue () case NONE: break; case ALIAS: + put(_value.alias); _value.alias = 0; break; case BOOL: @@ -661,6 +662,7 @@ SGPropertyNode::SGPropertyNode (const SGPropertyNode &node) break; case ALIAS: _value.alias = node._value.alias; + get(_value.alias); _tied = false; break; case BOOL: @@ -776,6 +778,7 @@ SGPropertyNode::alias (SGPropertyNode * target) if (target == 0 || _type == ALIAS || _tied) return false; clearValue(); + get(target); _value.alias = target; _type = ALIAS; return true; @@ -800,8 +803,7 @@ SGPropertyNode::unalias () { if (_type != ALIAS) return false; - _type = NONE; - _value.alias = 0; + clearValue(); return true; } -- 2.39.5