🎉 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!

Bug with class member and REF_CAST?

Started by
0 comments, last by WitchLord 16 years ago
Hello, Bug with class member and REF_CAST? or maybe i'm doing something wrong? Angelscript version is 2.13.0 Here is script code which tell everythig:

class CTest
{
	typeA@ m_a;
	typeB@ m_b;

	CTest()
	{
		@m_a = null;
		@m_b = null;
	}

	void dont_work(typeA@ arg)
	{
		@m_a = @arg;
		@m_b = cast<typeB@>(m_a);
	}

	void work(typeA@ arg)
	{
		typeA@ a = @arg;
		@m_b = cast<typeB@>(a);
	}
};
the method 'dont_work' script is calling 'Release' method on wrong/bad pointer I will send you on andreas@angelcode.com also a sample application. //EDIT I have tested this more and any ref_cast on class member which is handler causing app crush. Best Regards, Marcin Musiał [Edited by - Pris on June 11, 2008 6:58:57 AM]
Advertisement
This bug has now been fixed. The code fix is available in the SVN.

Thanks a lot for making it easier to pinpoint the bug.

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