From: Rebecca N. Palmer Date: Sun, 18 Jan 2015 21:29:19 +0000 (+0000) Subject: Fix UpdateOnceCallback crash (bug 1554/1556/1568) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=dc1816bb08198dbc31656e271ed553dbe1e162b1;p=simgear.git Fix UpdateOnceCallback crash (bug 1554/1556/1568) --- diff --git a/simgear/scene/util/UpdateOnceCallback.cxx b/simgear/scene/util/UpdateOnceCallback.cxx index 99d0192b..8100eaa3 100644 --- a/simgear/scene/util/UpdateOnceCallback.cxx +++ b/simgear/scene/util/UpdateOnceCallback.cxx @@ -28,6 +28,9 @@ using namespace osg; void UpdateOnceCallback::operator()(Node* node, NodeVisitor* nv) { + ref_ptr prevent_premature_deletion=this; + // workaround for crash bug in OSG 3.2.1 + // https://bugs.debian.org/765855 doUpdate(node, nv); node->removeUpdateCallback(this); // The callback could be deleted now.