Fix UpdateOnceCallback crash (bug 1554/1556/1568)
This commit is contained in:
@@ -28,6 +28,9 @@ using namespace osg;
|
|||||||
|
|
||||||
void UpdateOnceCallback::operator()(Node* node, NodeVisitor* nv)
|
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);
|
doUpdate(node, nv);
|
||||||
node->removeUpdateCallback(this);
|
node->removeUpdateCallback(this);
|
||||||
// The callback could be deleted now.
|
// The callback could be deleted now.
|
||||||
|
|||||||
Reference in New Issue
Block a user