Attempting to Access FLandscapeInfoLayerSettings.GetEditorSettings() Results in Crash

If a landscape has a layer without layerinfo associated with it in the editor, and you try to access that layer’s FLandscapeEditorLayerSettings in c++, the editor will crash.

Here is a repro case where that 3rd layer will result in a crash:

61264-bug.jpg

Obviously I’m trying to check whether the object returns null, but the exception occurs here at the check() function so nothing gets returned:

FLandscapeEditorLayerSettings& FLandscapeInfoLayerSettings::GetEditorSettings() const
{
	check(LayerInfoObj);

	ULandscapeInfo* LandscapeInfo = Owner->GetLandscapeInfo();
	return LandscapeInfo->GetLayerEditorSettings(LayerInfoObj);
}

Any workarounds?