X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c39d2e0a3822e695efdfb2ead77a09defd6ed8c1..b356aa554a82f4d82f0c12abb83eb4656204fe7a:/src/common/glcmn.cpp diff --git a/src/common/glcmn.cpp b/src/common/glcmn.cpp index 6b68538dc4..ff3aa28601 100644 --- a/src/common/glcmn.cpp +++ b/src/common/glcmn.cpp @@ -59,9 +59,10 @@ 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)); } +#ifndef wxHAS_OPENGL_ES bool wxGLCanvasBase::SetColour(const wxString& colour) { wxColour col = wxTheColourDatabase->Find(colour); @@ -88,6 +89,7 @@ bool wxGLCanvasBase::SetColour(const wxString& colour) return true; } +#endif wxGLCanvasBase::~wxGLCanvasBase() { @@ -118,6 +120,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