]> git.mxchange.org Git - simgear.git/commit
Canvas: use weak pointer to protect parent element access.
authorThomas Geymayer <tomgey@gmail.com>
Tue, 29 Sep 2015 19:38:52 +0000 (21:38 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Wed, 30 Sep 2015 09:54:19 +0000 (11:54 +0200)
commit00a20409f716e187cbe85a20310f7a9444ba67bd
tree140042550a73c0df34de8b55378c64e8f4108ea2
parent3bfd0c872a7807c2a648e4435047fed4a52e555b
Canvas: use weak pointer to protect parent element access.

Using a weak pointer is the best way to ensure no invalid
pointer is used. This also fixes a possible crash in
simgear::canvas::Element::getParentStyle on destructing
canvas elements.
12 files changed:
simgear/canvas/elements/CanvasElement.cxx
simgear/canvas/elements/CanvasElement.hxx
simgear/canvas/elements/CanvasGroup.cxx
simgear/canvas/elements/CanvasGroup.hxx
simgear/canvas/elements/CanvasImage.cxx
simgear/canvas/elements/CanvasImage.hxx
simgear/canvas/elements/CanvasMap.cxx
simgear/canvas/elements/CanvasMap.hxx
simgear/canvas/elements/CanvasPath.cxx
simgear/canvas/elements/CanvasPath.hxx
simgear/canvas/elements/CanvasText.cxx
simgear/canvas/elements/CanvasText.hxx