diff --git a/lib/remote/apiclient.cpp b/lib/remote/apiclient.cpp index 813ed0b0d..303087fb8 100644 --- a/lib/remote/apiclient.cpp +++ b/lib/remote/apiclient.cpp @@ -95,7 +95,7 @@ void ApiClient::SendMessageSync(const Dictionary::Ptr& message) void ApiClient::Disconnect(void) { - Utility::QueueAsyncCallback(boost::bind(&ApiClient::DisconnectSync, this)); + Utility::QueueAsyncCallback(boost::bind(&ApiClient::DisconnectSync, static_cast(GetSelf()))); } void ApiClient::DisconnectSync(void)