Component in constructor is nullptr

I have a class that extends ACharacter.

ATBCBaseCharacter::ATBCBaseCharacter()
{
        GetCapsuleComponent()->SetCollisionResponseToChannel(ECC_Visibility, ECR_Block);
}

Exception 0xc0000005 encountered at address 0x7ff6c1c75f9e: Access violation reading location 0x00000000

GetCapsuleComponent() is nullptr when I launch game in Target: Game, in Target: Editor everything is fine. I tried reloading blueprints and repareting them, didn’t work. How to fix this stupid bug?

Not sure in your case, but unreal creates first actor, then its components.
So it may be that when you try to get pointer component is not yet created.

(post deleted by author)

bWithPushModel parameter in Target.cs file caused this and many other problems in my project if not launched with editor, so I guess PushModel is not working correctly yet. :confused: