Hello GL2 example: Fix exit crash

Bail out of cleanup() when run 2nd time.

Task-number: QTBUG-60626
Change-Id: I8a9be2fcfb0e8a5584ce8ed7952affff24bd2a33
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Friedemann Kleint 2017-08-29 16:19:09 +02:00
parent b3717fc7f0
commit e29b72384b

View File

@ -128,6 +128,8 @@ void GLWidget::setZRotation(int angle)
void GLWidget::cleanup()
{
if (m_program == nullptr)
return;
makeCurrent();
m_logoVbo.destroy();
delete m_program;