Trying to add TSharedFromThis class to dynamic delegate

Hi, I am trying to add a TSharedFromThis class to a dynamic delegate, but i get the following error:

binary ‘=’ : no operator found which
takes a right-hand operand of type
‘FMySharedFromThisClass*’ (or there is
no acceptable conversion) 1>
c:\program files\epic
games\4.8\engine\source\runtime\coreuobject\public\uobject\WeakObjectPtr.h(72):
could be ‘void
FWeakObjectPtr::operator =(const
FWeakObjectPtr &)’ 1>
c:\program files\epic
games\4.8\engine\source\runtime\coreuobject\public\uobject\WeakObjectPtr.h(66):
or ‘void
FWeakObjectPtr::operator =(const
UObject *)’
1> c:\program files\epic games\4.8\engine\source\runtime\core\public\delegates\DelegateSignatureImpl_Variadics.inl(1273)
: see reference to function template
instantiation ‘void
TBaseDynamicDelegate *>::__Internal_BindDynamic(UserClass
,void (__cdecl FMySharedFromThisClass::
)(AEvolvationHUD *),const TCHAR *)’
being compiled 1> with 1>
[ 1> RetValType=void 1>
,
UserClass=FMySharedFromThisClass 1>
] 1> c:\program files\epic
games\4.8\engine\source\runtime\core\public\delegates\DelegateSignatureImpl_Variadics.inl(1273)
: see reference to function template
instantiation ‘void
TBaseDynamicDelegate *>::__Internal_BindDynamic(UserClass
,void (__cdecl FMySharedFromThisClass::
)(AEvolvationHUD *),const TCHAR *)’
being compiled 1> with 1>
[ 1> RetValType=void 1>
,
UserClass=FMySharedFromThisClass 1>
] 1>
MySharedFromThisClass.cpp(37)
: see reference to function template
instantiation ‘void
TBaseDynamicMulticastDelegate *>::__Internal_AddDynamic(UserClass
,void (__cdecl FMySharedFromThisClass::
)(AEvolvationHUD *),const TCHAR *)’
being compiled 1> with 1>
[ 1>
ObjectType=FMySharedFromThisClass 1>
,
UserClass=FMySharedFromThisClass 1>
] 1>
MySharedFromThisClass.cpp(37)
: see reference to function template
instantiation ‘void
TBaseDynamicMulticastDelegate *>::__Internal_AddDynamic(UserClass
,void (__cdecl FMySharedFromThisClass::
)(AHUD *),const TCHAR *)’
being compiled 1> with 1>
[ 1>
ObjectType=FMySharedFromThisClass 1>
,
UserClass=FMySharedFromThisClass 1>
]

I get this error simply using the following code.

Dialog->OnConfirmed.AddDynamic(this,
&FMySharedFromThisClass::OnClickedOK);

Class definition:

class FMySharedFromThisClass: public
TSharedFromThis
{ … };