Only connect the Scene::resetCompositing signal when Scene got constructed
SceneOpenGL::createScene() might return a null pointer and in this case we should not try to connect to it. REVIEW: 118462
This commit is contained in:
parent
b995c9da23
commit
4c241f0920
1 changed files with 3 additions and 2 deletions
|
@ -213,14 +213,15 @@ void Compositor::slotCompositingOptionsInitialized()
|
|||
#endif
|
||||
|
||||
m_scene = SceneOpenGL::createScene();
|
||||
connect(m_scene, SIGNAL(resetCompositing()), SLOT(restart()));
|
||||
|
||||
// TODO: Add 30 second delay to protect against screen freezes as well
|
||||
unsafeConfig.writeEntry(openGLIsUnsafe, false);
|
||||
unsafeConfig.sync();
|
||||
|
||||
if (m_scene && !m_scene->initFailed())
|
||||
if (m_scene && !m_scene->initFailed()) {
|
||||
connect(static_cast<SceneOpenGL*>(m_scene), &SceneOpenGL::resetCompositing, this, &Compositor::restart);
|
||||
break; // -->
|
||||
}
|
||||
delete m_scene;
|
||||
m_scene = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue