# Pointer issues UDecalComponent

**URL:** <https://forums.unrealengine.com/t/pointer-issues-udecalcomponent/465703>\
**Category:** Rendering\
**Tags:** unreal-engine, pointer, Decals, question\
**Created:** [May 24, 2020, 2:09am UTC](https://forums.unrealengine.com/t/pointer-issues-udecalcomponent/465703 "2020-05-24T02:09:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BEnSon1101](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BEnSon1101](https://forums.unrealengine.com/u/BEnSon1101)\
**Post date:** [May 24, 2020, 2:09am UTC](https://forums.unrealengine.com/t/pointer-issues-udecalcomponent/465703/1 "2020-05-24T02:09:12Z")

</div>

UDecalComponent\* DC;  
DC.FadeScreenSize = 1;  
FVector BulletHoleSize = FVector(3.5f, 7.f, 7.f);  
DC = UGameplayStatics::SpawnDecalAtLocation(GetWorld(), BulletHoleDecal, BulletHoleSize, HitResult.ImpactPoint, HitResult.ImpactNormal.Rotation(), 5.f);

**the error is in DC.FadeScreenSize** and I am assuming I am incorrectly using pointers

---

<div class="post-metadata">

**Author:** ![Ali\_TeamRevived](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_teamrevived/32/623450_2.png) [@Ali\_TeamRevived](https://forums.unrealengine.com/u/Ali_TeamRevived)\
**Post date:** [May 24, 2020, 11:16am UTC](https://forums.unrealengine.com/t/pointer-issues-udecalcomponent/465703/2 "2020-05-24T11:16:46Z")

</div>

DC is a null pointer. You have to initialize it first. If this code happens in your class constructor you could use:

```
UDecalComponent* DC = CreateDefaultSubobject<UDecalComponent>(TEXT("DC"));

```

Also, use → to reach a pointer’s members not dot:

```
DC->FadeScreenSize = 1;

```

instead of

DC.FadeScreenSize = 1;
