]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/webview_ie.h
Correctly initialise ref count in custom scheme class factory.
[wxWidgets.git] / include / wx / msw / webview_ie.h
index f6e7688c46e884763c81212517e40e5a091f676a..407174b0e5efad39665503c062253fc0e323dcb5 100644 (file)
@@ -209,10 +209,8 @@ public:
 
 class ClassFactory : public IClassFactory
 {
-private:
-    ULONG m_refCount;
 public:
-    ClassFactory(wxSharedPtr<wxWebViewHandler> handler) : m_handler(handler) {}
+    ClassFactory(wxSharedPtr<wxWebViewHandler> handler) : m_handler(handler), m_refCount(0) {}
     //IUnknown
     ULONG STDMETHODCALLTYPE AddRef();
     HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
@@ -223,6 +221,7 @@ public:
                                              REFIID riid, void** ppvObject);
     HRESULT STDMETHODCALLTYPE LockServer(BOOL fLock);
 private:
+    ULONG m_refCount;
     wxSharedPtr<wxWebViewHandler> m_handler;
 };