diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-05-29 05:27:46 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-05-29 05:50:02 +0200 |
commit | 228c5099962b7b7574326e3c328db4165796e8a8 (patch) | |
tree | 118e903b00a5bf21701757425693448ddba216bd /avmedia/source/opengl | |
parent | a71ae24a236aa7bf6c17cad92a1662e63b7a13bf (diff) |
OGLPlayer: check before dereference
Change-Id: I4bbaf97fe8c5def441ca106c26ad312281ed352f
Diffstat (limited to 'avmedia/source/opengl')
-rw-r--r-- | avmedia/source/opengl/oglplayer.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx index 4f173563d7e4..fb94c5a33c3c 100644 --- a/avmedia/source/opengl/oglplayer.cxx +++ b/avmedia/source/opengl/oglplayer.cxx @@ -31,14 +31,17 @@ OGLPlayer::OGLPlayer() OGLPlayer::~OGLPlayer() { - for (size_t i = 0; i < m_pHandle->size; ++i) + if( m_pHandle ) { - if (m_pHandle->files[i].type != GLTF_JSON) + for (size_t i = 0; i < m_pHandle->size; ++i) { - delete [] m_pHandle->files[i].buffer; + if (m_pHandle->files[i].type != GLTF_JSON) + { + delete [] m_pHandle->files[i].buffer; + } } + gltf_renderer_release(m_pHandle); } - gltf_renderer_release(m_pHandle); } static bool lcl_LoadFile( glTFFile* io_pFile, const OUString& rURL) |