X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c39d2e0a3822e695efdfb2ead77a09defd6ed8c1..345ff9c65b3ef17709785708b224dfcbf5135583:/src/common/glcmn.cpp?ds=inline diff --git a/src/common/glcmn.cpp b/src/common/glcmn.cpp index 6b68538dc4..675f512a4d 100644 --- a/src/common/glcmn.cpp +++ b/src/common/glcmn.cpp @@ -57,11 +57,12 @@ bool wxGLCanvasBase::SetCurrent(const wxGLContext& context) const // although on MSW it works even if the window is still hidden, it doesn't // work in other ports (notably X11-based ones) and documentation mentions // 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") ); + wxASSERT_MSG( IsShownOnScreen(), wxT("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