Advertisement

scriptany addon eats typeinfo references when nulls are stored

Started by February 20, 2016 01:44 AM
0 comments, last by WitchLord 8 years, 9 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.

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