Changed Execute to ExecuteIfBound to prevent errors if we don't care about retrieving the error.

This commit is contained in:
Jamie Greunbaum 2023-04-02 01:34:41 -04:00
parent 4080957ccd
commit 406067fe22

View File

@ -140,19 +140,19 @@ void UBugMarkerSubsystem::LoadNewBatch()
void UBugMarkerSubsystem::FormPrepResponseCallback(const FUnrealzillaFormPrepData &Data)
{
this->FormPrepResponse.Execute(Data);
this->FormPrepResponse.ExecuteIfBound(Data);
}
void UBugMarkerSubsystem::POSTResponseCallback(const TArray<FUnrealzillaBugData> &Data)
{
if (!Data.IsEmpty())
{
this->FormPostResponse.Execute(Data[0]);
this->FormPostResponse.ExecuteIfBound(Data[0]);
}
}
void UBugMarkerSubsystem::ErrorResponseCallback(const FUnrealzillaErrorData &Error)
{
this->ErrorResponse.Execute(Error);
this->ErrorResponse.ExecuteIfBound(Error);
}