eglfs: hooks can never be null

e60ca0de60 reworked the hooks design.
hooks is initialized with a stub pointer if we don't have a platform
hook.

Change-Id: Ia60facfebd9e4d9c08d237c6d49793efb598130f
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
Girish Ramakrishnan 2012-05-17 13:51:51 -07:00 committed by Qt by Nokia
parent 5672cbf131
commit dd699d5ea5

View File

@ -123,7 +123,6 @@ QEglFSScreen::QEglFSScreen()
qWarning("QEglScreen %p\n", this);
#endif
if (hooks)
hooks->platformInit();
EGLint major, minor;
@ -165,12 +164,10 @@ QEglFSScreen::~QEglFSScreen()
if (m_surface)
eglDestroySurface(m_dpy, m_surface);
if (hooks)
hooks->destroyNativeWindow(m_window);
eglTerminate(m_dpy);
if (hooks)
hooks->platformDestroy();
}
@ -205,7 +202,6 @@ void QEglFSScreen::createAndSetPlatformContext()
EGLConfig config = q_configFromGLFormat(m_dpy, platformFormat);
if (hooks)
m_window = hooks->createNativeWindow(hooks->screenSize());
#ifdef QEGL_EXTRA_DEBUG