summaryrefslogtreecommitdiff
path: root/avmedia/source/opengl/oglplayer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'avmedia/source/opengl/oglplayer.cxx')
-rw-r--r--avmedia/source/opengl/oglplayer.cxx11
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)