Getting Assertion failed: Other.BulkData after trying to call SkeletalMesh->GetSourceModel(); in a C++ BlueprintFunctionLibrary Node. Only works if the blueprint is placed in a level and saved before

Hello everyone,

I’m trying to get a FStaticLODModel off of a SkeletalMesh to expose some infos via a blueprint node.

If I start a fresh editor and just drag the blueprint into the viewport, the editor will crash every time.
However if I put it in and save the Level afterwards, it works perfectly, even if create a new Level put it in without saving it afterwards.

Which leads me to believe that something is happening when the level is saved that is needed for this to work.

I also tried getting to the info via loading the LODModel directly from the FSkeletalMeshResource but it results in the same error when trying to access the array. LODModels.Num() returns 1.

The full error message is:
Assertion failed: Other.BulkData [File:D:\Build++UE4+Release-4.12+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\BulkData.cpp] [Line: 1086]

MyBlueprintFunctionLibrary.cpp:

// Fill out your copyright notice in the Description page of Project Settings.

#include "MyProject.h"
#include "MyBlueprintFunctionLibrary.h"



void UMyBlueprintFunctionLibrary::GetSourceModelTest(USkeletalMeshComponent* SkeletalMeshCompIn, int& LodNum)
{

	FSkeletalMeshResource* MeshRes;

	MeshRes = SkeletalMeshCompIn->SkeletalMesh->GetImportedResource();
	LodNum = MeshRes->LODModels.Num();

	FStaticLODModel SourceModel = SkeletalMeshCompIn->SkeletalMesh->GetSourceModel();
}

MyBlueprintFunctionLibrary.h:

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"
#include "MyBlueprintFunctionLibrary.generated.h"

/**
 * 
 */
UCLASS()
class MYPROJECT_API UMyBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
	
	public:
		UFUNCTION(BlueprintCallable, Category = "MeshBP")
		static void GetSourceModelTest(USkeletalMeshComponent* SkeletalMeshCompIn, int& LodNum);
	
};

Would be awesome if someone has some additional insight on this.

Thanks in advance!