Editor Crash when trying to edit Foliage

I was able to resolve this by adding a UPrimitiveComponent* PrimComp nullptr check before the CanPaint in FoliageEdMode.cpp

Hello,

First let me describe the issue. For our current project we are using a tiled landscape via Landscape Streaming proxies. When loading in one of the landscape tiles I crash when trying to edit foliage.

More specifically the crash happens at the very moment I hover over the editor main viewport after entering foliage mode. As long as I stay off the main viewport with the cursor everything is fine, I can switch between foliage and other modes as I like. It literally crashes the very moment the cursor touches the viewport border as you can see in the video below

See a video of the crash happening here:

Crash Window text here:

Dump file here:

Thanks.

https://github.com/EpicGames/UnrealEngine/pull/3479

Thanks, I’ve included this into 4.16.