Check context before attempting to release opengl resources


In case of QMl ApplicationWindow using applications, openGL context
seems to be 0 when the renderer gets destroyed at application
shutdown. Work around this by checking for context validity on
destructors before attempting to free openGL resources.

Change-Id: I5ba5209740f8f4467f4ba2cc8dd195171bcd13c8
Reviewed-by: Mika Salmela <mika.salmela@digia.com>
commitc32f52c8a00292d91ada5b8cf05b6edc6713ead2
parentdcf57ae33cbe173724f7f18d94c3d67cac27fac1
authorMiikka Heikkinen <miikka.heikkinen@digia.com>
committerMiikka Heikkinen <miikka.heikkinen@digia.com>
commit timeFri, 20 Dec 2013 11:41:54 +0200