]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/weakref.h
Fix emulator compilation with wxX11 after GetMainWindow() renaming.
[wxWidgets.git] / include / wx / weakref.h
index 96ed48ee6f35619419f784d489cd13febc91723f..df31c2fdc4abd612c3d8c9859d1c5d07935857b2 100644 (file)
@@ -211,6 +211,13 @@ public:
     // Default ctor
     wxWeakRef() { }
 
+    // Ctor from the object of this type: this is needed as the template ctor
+    // below is not used by at least g++4 when a literal NULL is used
+    wxWeakRef(T *pobj)
+    {
+        Assign(pobj);
+    }
+
     // When we have the full type here, static_cast<> will always work
     // (or give a straight compiler error).
     template <class TDerived>