]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/variant.cpp
currently avoid problems when releasing the capture during drag on osx_cocoa
[wxWidgets.git] / src / common / variant.cpp
index 81117ab99bcb2c94819ff2b83978bb4bde3f18c9..0470d2d4b373bd5f563fcce865d09580390c0b9f 100644 (file)
@@ -206,6 +206,10 @@ wxAnyToVariantRegistration::
     wxPreRegisterAnyToVariant(this);
 }
 
+wxAnyToVariantRegistration::~wxAnyToVariantRegistration()
+{
+}
+
 wxVariant::wxVariant(const wxAny& any)
     : wxObject()
 {
@@ -224,8 +228,8 @@ wxAny wxVariant::GetAny() const
     if ( IsNull() )
         return wxAny();
 
-    wxVariantData* data = GetData();
     wxAny any;
+    wxVariantData* data = GetData();
 
     if ( data->GetAsAny(&any) )
         return any;
@@ -1946,7 +1950,7 @@ bool wxVariantDataList::GetAsAny(wxAny* any) const
     while (node)
     {
         wxVariant* pVar = node->GetData();
-        dst.push_back(new wxAny(*pVar));
+        dst.push_back(new wxAny(((const wxVariant&)*pVar)));
         node = node->GetNext();
     }