# Playing PlayEventAtLocation from UOBject crashing piece of code

**URL:** <https://qa.fmod.com/t/playing-playeventatlocation-from-uobject-crashing-piece-of-code/14834>\
**Category:** Unreal Engine\
**Created:** [July 8, 2019, 2:09pm UTC](https://qa.fmod.com/t/playing-playeventatlocation-from-uobject-crashing-piece-of-code/14834 "2019-07-08T14:09:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KrzysztofSiewiorek\_T](https://avatars.discourse-cdn.com/v4/letter/k/7c8e57/32.png) [@KrzysztofSiewiorek\_T](https://qa.fmod.com/u/KrzysztofSiewiorek_T)\
**Post date:** [July 8, 2019, 2:09pm UTC](https://qa.fmod.com/t/playing-playeventatlocation-from-uobject-crashing-piece-of-code/14834/1 "2019-07-08T14:09:15Z")

</div>

Hi,  
Using PlayEventAtLocation from UObject that doesn’t have proper world context crashes the game - also blueprint function doesn’t not ask to have one as required so it should work. It’s casued by this piece of code in FMODBlueprintStatics.cpp

```
UWorld *ThisWorld = GEngine->GetWorldFromContextObjectChecked(WorldContextObject);
if (FMODUtils::IsWorldAudible(ThisWorld, false) && IsValid(Event))

```

IsWorldAudible() returns true when provided world is nullptr ( so it works correctly ), but GetWorldFromContextObjectChecked() has a check() function that crashes the game if it’s nullptr. GetWorldFromContextObject() should be used instead ( checkless version ).

Tested. Work.

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [July 15, 2019, 1:34am UTC](https://qa.fmod.com/t/playing-playeventatlocation-from-uobject-crashing-piece-of-code/14834/2 "2019-07-15T01:34:03Z")

</div>

Thanks for bringing this to our attention, I believe this was originally changed because the non-checked version had been deprecated. Although it should have been replaced with:

```auto
UWorld *ThisWorld = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::ReturnNull);

```

I’ll make a task to get this fixed up.
