Skip to content
Snippets Groups Projects
Commit 5617b1fe authored by David Gilbert's avatar David Gilbert :bug:
Browse files

fix(pawn): Adds check for invalid IMC

parent 965a3f01
Branches
Tags
1 merge request!93feature(replication, pawn): Adds (initial) different way to attach DCRA to...
......@@ -6,6 +6,7 @@
#include "Engine/LocalPlayer.h"
#include "GameFramework/PlayerController.h"
#include "ILiveLinkClient.h"
#include "InputMappingContext.h"
#include "Core/RWTHVRPlayerState.h"
#include "Kismet/GameplayStatics.h"
#include "Logging/StructuredLog.h"
......@@ -143,10 +144,17 @@ void ARWTHVRPawn::SetupPlayerInputComponent(UInputComponent* PlayerInputComponen
}
// bind the current mapping contexts
for (const auto& Mapping : InputMappingContexts)
for (const auto Mapping : InputMappingContexts)
{
if (Mapping && IsValid(Mapping))
{
AddInputMappingContext(PlayerController, Mapping);
}
else
{
UE_LOGFMT(Toolkit, Warning, "ARWTHVRPawn::SetupPlayerInputComponent: InputMappingContext was invalid!");
}
}
}
UInputComponent* ARWTHVRPawn::GetPlayerInputComponent() { return ActivePlayerInputComponent; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment