X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c39d2e0a3822e695efdfb2ead77a09defd6ed8c1..57bf907d8e45ced18486d74c04f41c06034b7e65:/src/common/glcmn.cpp?ds=sidebyside diff --git a/src/common/glcmn.cpp b/src/common/glcmn.cpp index 6b68538dc4..4f5f9c6025 100644 --- a/src/common/glcmn.cpp +++ b/src/common/glcmn.cpp @@ -59,7 +59,7 @@ bool wxGLCanvasBase::SetCurrent(const wxGLContext& context) const // that SetCurrent() can only be called for a shown window, so check for it wxASSERT_MSG( IsShownOnScreen(), _T("can't make hidden GL canvas current") ); - return context.SetCurrent(*wx_static_cast(const wxGLCanvas *, this)); + return context.SetCurrent(*static_cast(this)); } bool wxGLCanvasBase::SetColour(const wxString& colour) @@ -118,6 +118,9 @@ void wxGLCanvasBase::OnSize(wxSizeEvent& WXUNUSED(event)) /* static */ bool wxGLCanvasBase::IsExtensionInList(const char *list, const char *extension) { + if ( !list ) + return false; + for ( const char *p = list; *p; p++ ) { // advance up to the next possible match