Skip to content

Commit 46d5dc0

Browse files
committed
Add feedback associated event id check to setter
1 parent 6a96e7c commit 46d5dc0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

plugin-dev/Source/Sentry/Private/Android/AndroidSentryFeedback.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ FString FAndroidSentryFeedback::GetContactEmail() const
5151

5252
void FAndroidSentryFeedback::SetAssociatedEvent(const FString& eventId)
5353
{
54+
if (eventId.IsEmpty())
55+
return;
56+
5457
TSharedPtr<FAndroidSentryId> idAndroid = MakeShareable(new FAndroidSentryId(eventId));
5558
CallMethod<void>(SetAssociatedEventMethod, idAndroid->GetJObject());
5659
}

plugin-dev/Source/Sentry/Private/GenericPlatform/GenericPlatformSentryFeedback.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ FString FGenericPlatformSentryFeedback::GetContactEmail() const
5757

5858
void FGenericPlatformSentryFeedback::SetAssociatedEvent(const FString& eventId)
5959
{
60+
if (eventId.IsEmpty())
61+
return;
62+
6063
sentry_value_set_by_key(Feedback, "associated_event_id", sentry_value_new_string(TCHAR_TO_UTF8(*eventId)));
6164
}
6265

0 commit comments

Comments
 (0)