summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-07-11 07:53:19 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-07-14 10:47:58 +0000
commitdbf566f4ede06935fa321427a780072c94c588d7 (patch)
tree766f820a0df891a82ecaea91c8f465858748da05
parent099a7f3039607eb56c433e8eebf8be02eb229c54 (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/10220 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-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);