Editor mode plugin crash

Hello UE4 community.
I’ve been trying to fix a problem with editor crash. It occurs when I try to click on my custom plugin in editor modes. The delegates in SEditableTextBox seem to be the problem because when I comment them out everything works but no idea why. Here’s the code:

GridToolsEdModeToolkit.h

FText GetRadius() const;
void SetRadius(const FText& InText);
static int32 Radius;

GridToolsEdModeToolkit.cpp

int32 FGridToolsEdModeToolkit::Radius = 0;

FText FGridToolsEdModeToolkit::GetRadius() const
{
	FText myText = FText::FromString(FString::FromInt(Radius));
	return myText;
}

void FGridToolsEdModeToolkit::SetRadius(const FText& InText)
{
	FString tempString = InText.ToString();
	Radius = FCString::Atoi(*tempString);
}

SAssignNew(ToolkitWidget, SBorder)
		.VAlign(VAlign_Top)
		.HAlign(HAlign_Center)
		.Padding(5)
		.IsEnabled_Static(&Locals::IsWidgetEnabled)
		[
			SNew(SVerticalBox)
			+ SVerticalBox::Slot()
				.VAlign(VAlign_Top)
				.HAlign(HAlign_Left)
				.Padding(5)
				[
					SNew(STextBlock)
					.AutoWrapText(true)
					.Text(LOCTEXT("TLabel", "T - Toggle tiles"))
				]
			+ SVerticalBox::Slot()
				.VAlign(VAlign_Top)
				.HAlign(HAlign_Left)
				.Padding(5)
				[
					SNew(STextBlock)
					.AutoWrapText(true)
					.Text(LOCTEXT("ELabel", "E - Enable tiles"))
				]
			+ SVerticalBox::Slot()
				.VAlign(VAlign_Top)
				.HAlign(HAlign_Left)
				.Padding(5)
				[
					SNew(STextBlock)
					.AutoWrapText(true)
				.Text(LOCTEXT("DLabel", "D - Disable tiles"))
				]
			// SEditableTextBox
			+ SVerticalBox::Slot()
				[
					SNew(STextBlock)
					.Text(LOCTEXT("SEditableTextBoxLabel", "SEditableTextBox"))
				]
			
			+ SVerticalBox::Slot()
				.HAlign(HAlign_Left)
				.Padding(0.0f, 5.0f)
				[
					SNew(SEditableTextBox)
					.HintText(LOCTEXT("SEditableTextBoxHint", "Radius"))
					.Text(this, &FGridToolsEdModeToolkit::GetRadius)
					//.OnTextChanged(this, &FGridToolsEdModeToolkit::SetRadius)
				]
		];

Error info:

Assertion failed: SharedThis.Get() == this [File:D:\GitHub\UnrealEngine\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h] [Line: 1093] 



KERNELBASE.dll
UE4Editor-Core.dll!FOutputDeviceWindowsError::Serialize() [d:\github\unrealengine\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:102]
UE4Editor-Core.dll!FOutputDevice::Logf__VA() [d:\github\unrealengine\engine\source\runtime\core\private\misc\outputdevice.cpp:154]
UE4Editor-Core.dll!FDebug::AssertFailed() [d:\github\unrealengine\engine\source\runtime\core\private\misc\outputdevice.cpp:440]
UE4Editor-UnrealEd.dll!TSharedFromThis<FModeToolkit,0>::AsShared() [d:\github\unrealengine\engine\source\runtime\core\public\templates\sharedpointer.h:1097]
UE4Editor-GridTools.dll
UE4Editor-GridTools.dll
UE4Editor-GridTools.dll
UE4Editor-GridTools.dll
UE4Editor-UnrealEd.dll!FEditorModeTools::ActivateMode() [d:\github\unrealengine\engine\source\editor\unrealed\private\editormodemanager.cpp:361]
UE4Editor-LevelEditor.dll!SLevelEditor::ToggleEditorMode() [d:\github\unrealengine\engine\source\editor\leveleditor\private\sleveleditor.cpp:1240]
UE4Editor-LevelEditor.dll!TBaseStaticDelegateInstance<void __cdecl(void),FName>::ExecuteIfSafe() [d:\github\unrealengine\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:1021]
UE4Editor-Slate.dll!FUICommandList::ExecuteAction() [d:\github\unrealengine\engine\source\runtime\slate\private\framework\commands\uicommandlist.cpp:87]
UE4Editor-Slate.dll!SToolBarButtonBlock::OnClicked() [d:\github\unrealengine\engine\source\runtime\slate\private\framework\multibox\stoolbarbuttonblock.cpp:300]
UE4Editor-Slate.dll!SToolBarButtonBlock::OnCheckStateChanged() [d:\github\unrealengine\engine\source\runtime\slate\private\framework\multibox\stoolbarbuttonblock.cpp:326]
UE4Editor-Slate.dll!TBaseSPMethodDelegateInstance<0,SToolBarButtonBlock,0,TTypeWrapper<void> __cdecl(enum ECheckBoxState)>::Execute() [d:\github\unrealengine\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:321]
UE4Editor-Slate.dll!TBaseSPMethodDelegateInstance<0,SToolBarButtonBlock,0,void __cdecl(enum ECheckBoxState)>::ExecuteIfSafe() [d:\github\unrealengine\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:428]
UE4Editor-Slate.dll!SCheckBox::ToggleCheckedState() [d:\github\unrealengine\engine\source\runtime\slate\private\widgets\input\scheckbox.cpp:293]
UE4Editor-Slate.dll!SCheckBox::OnMouseButtonUp() [d:\github\unrealengine\engine\source\runtime\slate\private\widgets\input\scheckbox.cpp:184]
UE4Editor-Slate.dll!<lambda_8d0e9a1da76abd0a756a3a9d775f5ed1>::operator()() [d:\github\unrealengine\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4598]
UE4Editor-Slate.dll!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,<lambda_8d0e9a1da76abd0a756a3a9d775f5ed1> >() [d:\github\unrealengine\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:215]
UE4Editor-Slate.dll!FSlateApplication::RoutePointerUpEvent() [d:\github\unrealengine\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4587]
UE4Editor-Slate.dll!FSlateApplication::ProcessMouseButtonUpEvent() [d:\github\unrealengine\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5041]
UE4Editor-Slate.dll!FSlateApplication::OnMouseUp() [d:\github\unrealengine\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5021]
UE4Editor-Core.dll!FWindowsApplication::ProcessDeferredMessage() [d:\github\unrealengine\engine\source\runtime\core\private\windows\windowsapplication.cpp:1510]
UE4Editor-Core.dll!FWindowsApplication::DeferMessage() [d:\github\unrealengine\engine\source\runtime\core\private\windows\windowsapplication.cpp:1850]
UE4Editor-Core.dll!FWindowsApplication::ProcessMessage() [d:\github\unrealengine\engine\source\runtime\core\private\windows\windowsapplication.cpp:745]
UE4Editor-Core.dll!FWindowsApplication::AppWndProc() [d:\github\unrealengine\engine\source\runtime\core\private\windows\windowsapplication.cpp:667]
USER32.dll
USER32.dll
UE4Editor-Core.dll!FWindowsPlatformMisc::PumpMessages() [d:\github\unrealengine\engine\source\runtime\core\private\windows\windowsplatformmisc.cpp:903]
UE4Editor.exe!FEngineLoop::Tick() [d:\github\unrealengine\engine\source\runtime\launch\private\launchengineloop.cpp:2729]
UE4Editor.exe!GuardedMain() [d:\github\unrealengine\engine\source\runtime\launch\private\launch.cpp:148]
UE4Editor.exe!GuardedMainWrapper() [d:\github\unrealengine\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor.exe!WinMain() [d:\github\unrealengine\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:255]
kernel32.dll
ntdll.dll
ntdll.dll