summaryrefslogtreecommitdiff
path: root/avmedia
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-07-11 07:53:19 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-07-11 15:07:55 +0000
commit32ef78f1f3e1fd8c714ec7228be660f1edb97500 (patch)
treee6de126b5ae02ca28a1d376052a1942816dfe19a /avmedia
parentcb0cdfe344354b32a526780d78e50a9e8e1f8ab8 (diff)
glTF: crash after starting a model without an OpenGL window
Change-Id: I726f4d62ab062fbd41376183f60c26d8e6cfe33e (cherry picked from commit 6174152cfffd8e31b9eda238990a161c8c2b9a71) Reviewed-on: https://gerrit.libreoffice.org/10218 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'avmedia')
-rw-r--r--avmedia/source/opengl/oglplayer.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx
index 85daa8d82aa7..f39f84749427 100644
--- a/avmedia/source/opengl/oglplayer.cxx
+++ b/avmedia/source/opengl/oglplayer.cxx
@@ -144,6 +144,9 @@ void SAL_CALL OGLPlayer::start() throw ( uno::RuntimeException, std::exception )
osl::MutexGuard aGuard(m_aMutex);
assert(m_pHandle);
+ if(!m_pOGLWindow)
+ return;
+
// gltf_animation_start play animation from the time 0.0,
// but OGLPlayer::start used as play from that time where it was stopped before
double fTime = gltf_animation_get_time(m_pHandle);