]> git.mxchange.org Git - simgear.git/commitdiff
Fix UpdateOnceCallback crash (bug 1554/1556/1568)
authorRebecca N. Palmer <rebecca_palmer@zoho.com>
Sun, 18 Jan 2015 21:29:19 +0000 (21:29 +0000)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Sun, 18 Jan 2015 21:29:19 +0000 (21:29 +0000)
simgear/scene/util/UpdateOnceCallback.cxx

index 99d0192b0f5d3e2ab056d13a58e3281a50dfdb32..8100eaa356852404b9793f753fa1480faf694055 100644 (file)
@@ -28,6 +28,9 @@ using namespace osg;
 
 void UpdateOnceCallback::operator()(Node* node, NodeVisitor* nv)
 {
+    ref_ptr<UpdateOnceCallback> 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.