X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bc036010973de6b66905a58bfa79b21f3b98cfa2..44353523d85ba44f62bad4ab7b27a14001d4b1ae:/src/common/mediactrlcmn.cpp diff --git a/src/common/mediactrlcmn.cpp b/src/common/mediactrlcmn.cpp index f5994cb27b..074777d486 100644 --- a/src/common/mediactrlcmn.cpp +++ b/src/common/mediactrlcmn.cpp @@ -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; @@ -392,7 +388,7 @@ wxSize wxMediaCtrl::DoGetBestSize() const { if(m_imp) return m_imp->GetVideoSize(); - return wxSize(); + return wxSize(0,0); } //---------------------------------------------------------------------------