summaryrefslogtreecommitdiff
path: root/vcl/opengl
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-04-30 14:58:27 +0900
committerTomaž Vajngerl <quikee@gmail.com>2016-05-08 07:59:11 +0000
commitd22ca8d8cb050b9006720f39c612c5c32eab8795 (patch)
tree1ca641eb9f31931c7a05fd5b1c044223921469f2 /vcl/opengl
parent21c4f87e2be0c7e69452219370f95ca9c89cedeb (diff)
tdf#99258 bail out if we fail to reserve the texture
Change-Id: I830e313352b69a7665bff953aadb1334be0dc847 Reviewed-on: https://gerrit.libreoffice.org/24509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/opengl')
-rw-r--r--vcl/opengl/texture.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx
index aa796eb6cde2..0999484e0a60 100644
--- a/vcl/opengl/texture.cxx
+++ b/vcl/opengl/texture.cxx
@@ -457,7 +457,9 @@ void OpenGLTexture::GetWholeCoord( GLfloat* pCoord ) const
OpenGLTexture OpenGLTexture::GetWholeTexture()
{
- return OpenGLTexture(mpImpl, Rectangle(Point(0, 0), Size(mpImpl->mnWidth, mpImpl->mnHeight)), -1);
+ if (mpImpl)
+ return OpenGLTexture(mpImpl, Rectangle(Point(0, 0), Size(mpImpl->mnWidth, mpImpl->mnHeight)), -1);
+ return OpenGLTexture();
}
GLenum OpenGLTexture::GetFilter() const