Skip to main content
GameDev.net gamedev.net
🔒 Locked

scriptany addon eats typeinfo references when nulls are stored

Started by GGLucas Feb 20, 2016 at 1:44 AM 0 replies 1.9k views
Original Post
GGLucas
GGLucas

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.

WitchLord
WitchLord

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 - <a href="http://www.angelcode.com/tower" rel

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.