]> git.mxchange.org Git - flightgear.git/commit
Fix for a premature deletion bug. The _arg SGPropertyNode* is passed
authorandy <andy>
Mon, 22 Dec 2003 19:18:22 +0000 (19:18 +0000)
committerandy <andy>
Mon, 22 Dec 2003 19:18:22 +0000 (19:18 +0000)
commitd14bba8458d6b1276b33467610d3dbc5a3f8d939
tree3813ed440bd3aeb582e8c6f0aa565ea909e5f8c0
parenta59a27270243b4821e24d7572765b555c7eaeb49
Fix for a premature deletion bug.  The _arg SGPropertyNode* is passed
to handlers which might want to assign it to a SGPropertyNode_ptr for
reference counting (Nasal does, for instance, to prevent garbage
collector interactions).  If that smart pointer is then destroyed,
that will free this object while it is still live.

Simply use a SGPropertyNode_ptr here; the code ends up smaller as a
bonus, since FGBinding no longer has to deallocation for _arg.
src/Input/input.cxx
src/Input/input.hxx