diff options
Diffstat (limited to 'src/plugins/graphicssystems/meego/qmeegographicssystem.cpp')
-rw-r--r-- | src/plugins/graphicssystems/meego/qmeegographicssystem.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp index 20b092e..a70d232 100644 --- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp +++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp @@ -42,6 +42,7 @@ #include <QDebug> #include <private/qpixmap_raster_p.h> #include <private/qwindowsurface_gl_p.h> +#include <private/qwindowsurface_raster_p.h> #include <private/qegl_p.h> #include <private/qglextensions_p.h> #include <private/qgl_p.h> @@ -75,7 +76,12 @@ QMeeGoGraphicsSystem::~QMeeGoGraphicsSystem() QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const { - QGLShareContextScope ctx(qt_gl_share_widget()->context()); + QGLWidget *shareWidget = qt_gl_share_widget(); + + if (!shareWidget) + return new QRasterWindowSurface(widget); + + QGLShareContextScope ctx(shareWidget->context()); QMeeGoGraphicsSystem::surfaceWasCreated = true; QWindowSurface *surface = new QGLWindowSurface(widget); |