From 306985b370c5c7564a955480418518899103f902 Mon Sep 17 00:00:00 2001 From: Fred8511 <168559897+Fred8511@users.noreply.github.com> Date: Tue, 30 Apr 2024 10:18:08 -0400 Subject: [PATCH] Update MobuLiveLinkDevice.cpp Check if the FBDevice is Online before stopping and starting the livelink, otherwise this may cause a crash in mobu when re-opening a scene with the device in it --- Source/Private/MobuLiveLinkDevice.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Source/Private/MobuLiveLinkDevice.cpp b/Source/Private/MobuLiveLinkDevice.cpp index 93592d10..2811f926 100644 --- a/Source/Private/MobuLiveLinkDevice.cpp +++ b/Source/Private/MobuLiveLinkDevice.cpp @@ -515,7 +515,7 @@ void FMobuLiveLink::StartLiveLink() } -void FMobuLiveLink::StopLiveLink() +void FMobuLiveLink::() { TickCoreTicker(); if (LiveLinkProvider.IsValid()) @@ -703,13 +703,16 @@ void FMobuLiveLink::SetUnicastEndpoint(const FString& InEndpoint) { if (IModularFeatures::Get().IsModularFeatureAvailable(INetworkMessagingExtension::ModularFeatureName)) { - StopLiveLink(); + if (Online){ + StopLiveLink(); + } UUdpMessagingSettings* Settings = GetMutableDefault(); Settings->UnicastEndpoint = InEndpoint; INetworkMessagingExtension& NetworkExtension = IModularFeatures::Get().GetModularFeature(INetworkMessagingExtension::ModularFeatureName); NetworkExtension.RestartServices(); - - StartLiveLink(); + if (Online){ + StartLiveLink(); + } SetRefreshUI(true); } }