Editor crashes after setting material

Hello,

my editor crashes if I set material of component using function. If I set material without function it works, but if I use function for it, it crashes.

Here is working (no crashing logic - without function):

Here is setting material function (crashing, but code looks same):

And here is node linking with that function:

Where can be problem? I need to have it in function.

It is happening when I created map of materials (variable) and inserted values, like this:

Whats the exact error you get?

Where can I find log from editor?

Changed version of Unreal Engine to 4.18 and it doesn’t crash.