🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

scriptany addon eats typeinfo references when nulls are stored

Started by
0 comments, last by WitchLord 8 years, 4 months ago

A simple bug this time, in the scriptany addon. CScriptAny::Store() and CScriptAny::operator=() both do asITypeInfo::AddRef() on the type of object stored, but only if the object stored is not null. CScriptAny::FreeObject() on the other hand always Release()s the asITypeInfo regardless of whether the value stored was null. So storing null pointers in any objects will eat references on asITypeInfo and eventually crash.

Advertisement

Thanks.

I've fixed this is revision 2294.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement