]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/mediactrlcmn.cpp
Add some asserts to ensure cols and rows are >= 0 to avoid crashes
[wxWidgets.git] / src / common / mediactrlcmn.cpp
index 15a67c9067d3ffb2dd745d4802ef0f131f94f211..c1cf31c007ddd507a0bfbbe1abf74407c0131a83 100644 (file)
@@ -107,8 +107,7 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
         {
             if (!Load(fileName))
             {
-                delete m_imp;
-                m_imp = NULL;
+                wxDELETE(m_imp);
                 return false;
             }
         }
@@ -124,7 +123,6 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
 
         while((classInfo = NextBackend(&it)) != NULL)
         {
-            wxLogMessage( classInfo->GetClassName() );
             if(!DoCreate(classInfo, parent, id,
                          pos, size, style, validator, name))
                 continue;
@@ -172,8 +170,7 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
 
         if (!Load(location))
         {
-            delete m_imp;
-            m_imp = NULL;
+            wxDELETE(m_imp);
             return false;
         }