From f63f25c51cbad355a4b1c33be574724f9ad6b252 Mon Sep 17 00:00:00 2001 From: Jamie Greunbaum Date: Fri, 21 Apr 2023 00:49:49 -0400 Subject: [PATCH] Changed Execute() to ExecuteIfBound() to prevent crashes when opening or closing the load screen. --- Source/CommonLoadingScreen/Private/LoadingScreenWidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/CommonLoadingScreen/Private/LoadingScreenWidget.cpp b/Source/CommonLoadingScreen/Private/LoadingScreenWidget.cpp index 7d4125d..458f649 100644 --- a/Source/CommonLoadingScreen/Private/LoadingScreenWidget.cpp +++ b/Source/CommonLoadingScreen/Private/LoadingScreenWidget.cpp @@ -6,13 +6,13 @@ void ULoadingScreenWidget::LoadScreenOpened() { #if !WITH_EDITOR - this->OnLoadScreenOpened.Execute(); + this->OnLoadScreenOpened.ExecuteIfBound(); #endif } void ULoadingScreenWidget::LoadScreenClosed() { #if !WITH_EDITOR - this->OnLoadScreenClosed.Execute(); + this->OnLoadScreenClosed.ExecuteIfBound(); #endif }