diff options
-rw-r--r-- | src/plugins/platforms/qnx/qqnxglcontext.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.cpp b/src/plugins/platforms/qnx/qqnxglcontext.cpp index 44935f7e36..7940156994 100644 --- a/src/plugins/platforms/qnx/qqnxglcontext.cpp +++ b/src/plugins/platforms/qnx/qqnxglcontext.cpp @@ -319,6 +319,10 @@ void QQnxGLContext::createSurface(QPlatformSurface *surface) // Fetch the surface size from the window and update // the window's buffers before we create the EGL surface const QSize surfaceSize = platformWindow->requestedBufferSize(); + if (!surfaceSize.isValid()) { + qFatal("QQNX: Trying to create 0 size EGL surface. " + "Please set a valid window size before calling QOpenGLContext::makeCurrent()"); + } platformWindow->setBufferSize(surfaceSize); // Obtain the native handle for our window |