Custom BlueprintFunctionLibrary CRASH

Hey RedeeV,

Looks like GetSprite( ) is returning a null object, resulting in the Access Violation.

Make sure the object that is getting returned from GetSprite( ) is valid before using it.

It looks to me like this could be the issue:

FVector2D USpriteFunctions::GetSourceSize(UPaperSprite* sprite)
{
    // "sprite" could be null, meaning it doesnt exist
    // If it is null and is used, it will cause crash
	return sprite->GetSourceSize();	
}

I do step-by-step from this guide but all times its crash…

Don’t understand what’s wrong… Please help me!

113679-2016-11-03_191133.jpg

[link text][3]

You can help me with Function which check this ?

okay but look for function in BluePrint…
which check for NULL ptr…
i can check in C++ YES… maybe yet already help tool for this operation ?

thank You for helpfully reply…

its already YES >>>

113682-2016-11-03_195633.jpg

Hey RedeeV,

Checking if the object is valid will prevent the object from ever attempting to be used if it is NULL, as stated earlier.

If after performing the IsValid check, you are still experiencing an issue, please feel free to leave a comment to reopen this thread and I’ll be glad to continue investigating.

For any new issues, please create a new Answerhub topic.

Have a great day

Thx, and You to… have awesome day !___))))