From dc1816bb08198dbc31656e271ed553dbe1e162b1 Mon Sep 17 00:00:00 2001 From: "Rebecca N. Palmer" Date: Sun, 18 Jan 2015 21:29:19 +0000 Subject: [PATCH] Fix UpdateOnceCallback crash (bug 1554/1556/1568) --- simgear/scene/util/UpdateOnceCallback.cxx | 3 +++ 1 file changed, 3 insertions(+) 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. -- 2.39.5