[suspicous bug]dynamic_cast btGeneric6DofConstraint

Post Reply
tlshao
Posts: 1
Joined: Wed Sep 03, 2014 10:30 am

[suspicous bug]dynamic_cast btGeneric6DofConstraint

Post by tlshao » Wed Sep 03, 2014 10:38 am

Hi all,
I may miss something, but it seems to me a little bug that btGeneric6DofConstraint doesn't have a virtual destructor.
It causes problem when compiled using vs2010:

Sample Code:

Code: Select all

btGeneric6DofSpringConstraint* con = new btGeneric6DofSpringConstraint(*(body),
			btTransform::getIdentity(),
			false);
btTypedConstraint* tc = dynamic_cast<btTypedConstraint*>(con); //fine
dynamic_cast<btGeneric6DofSpringConstraint*>(tc); //crash
May anyone help? thanks a lot.
best,

Post Reply