Jump to content
  • Advertisement
Sign in to follow this  
Pris

Bug with class member and REF_CAST?

This topic is 3664 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!