Access Violation on Editor Close using FSlateGameResources::Set()

##Reproduction steps and Error details:
I’m getting an Unhandled Exception in MultiCastDelegateBase.h FMulticastDelegateBase::RemoveAll line 82.

Exception thrown at 0x00007FFF6D190AD6 (UE4Editor-ContentBrowser.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

This specifically only occurs when the editor is run from Visual Studio, play in editor is pressed, wait 2 seconds and then click stop and close the editor (error on editor close). The error does not seem to occur if the dynamic brush fails to load the image.

From my debugging attempt what I’ve come to assume is that somewhere my code is causing UE’s garbage collector to attempt to delete an object twice (the second time failing on that line).

The specific line that seems to be causing the error (error does not occur if this line is not present):

Style->Set(BrushName, NewDynamicBrush);

##Supporting code:

Style is created in SSlateWidget::SetupStyle():

FSlateStyleRegistry::UnRegisterSlateStyle(StyleName);
Style = FSlateGameResources::New(StyleName, StylePath, StylePath);
FSlateStyleRegistry::RegisterSlateStyle(*Style.Get());

Brush is set in SSlateWidget::LoadBrush:

const FSlateBrush *RequestedBrush;
FSlateDynamicImageBrush *NewDynamicBrush = new FSlateDynamicImageBrush(BrushPath, BrushSize);

//This is the problem line (below). If NewDynamicBrush is returned and this line is commented out, everything works perfectly!

Style->Set(BrushName, NewDynamicBrush);
RequestedBrush = Style->GetBrush(BrushName);
return NewDynamicBrush;

Both functions are called in SSlateWidget::Construct:

StylePath = FPaths::GameContentDir() / "Slate";
SetupStyle();
LoadBrush("SmileyBrush", CreateBrushPath("Smiley", ".png"), FVector2D(200, 200));

ChildSlot
.VAlign(VAlign_Top)
.HAlign(HAlign_Center)
[
	SNew(STextBlock)
	.ShadowColorAndOpacity(FLinearColor::Black)
	.ColorAndOpacity(FLinearColor::Red)
	.ShadowOffset(FIntPoint(-1, 1))
	.Font(FSlateFontInfo("Veranda", 16))
	.Text(LOCTEXT("HelloSlate", "Hello World!"))
];

##Extra:

I have tested using the brush, which works both directly and when loaded from the FSlateGameResources object (image is loaded correctly and displayed on screen correctly). Using the brush does not affect the unhandled exception.

For more information, I’ve attached a stripped-down project that can reproduce the problem here: