]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix recursiveness on error...
authorRyan Norton <wxprojects@comcast.net>
Fri, 18 Mar 2005 19:57:54 +0000 (19:57 +0000)
committerRyan Norton <wxprojects@comcast.net>
Fri, 18 Mar 2005 19:57:54 +0000 (19:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/mediactrlcmn.cpp

index 1955ac10ced1a4d3569942b362526d8427dcd842..074777d48631384f0cb1be83221c214ebb1dbaa5 100644 (file)
@@ -108,9 +108,9 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
     {
         wxClassInfo::sm_classTable->BeginFind();
 
-        wxClassInfo* classInfo = NextBackend();
+        wxClassInfo* classInfo;
 
-        while(classInfo)
+        while((classInfo = NextBackend()) != NULL)
         {
             if(!DoCreate(classInfo, parent, id,
                          pos, size, style, validator, name))
@@ -131,8 +131,6 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
                 SetBestFittingSize(size);
                 return true;
             }
-
-            classInfo = NextBackend();
         }
 
         m_imp = NULL;
@@ -172,9 +170,9 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
     {
         wxClassInfo::sm_classTable->BeginFind();
 
-        wxClassInfo* classInfo = NextBackend();
+        wxClassInfo* classInfo;
 
-        while(classInfo)
+        while((classInfo = NextBackend()) != NULL)
         {
             if(!DoCreate(classInfo, parent, id,
                          pos, size, style, validator, name))
@@ -187,8 +185,6 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
             }
             else
                 delete m_imp;
-
-            classInfo = NextBackend();
         }
 
         m_imp = NULL;