summaryrefslogtreecommitdiff
path: root/vcl/inc/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/inc/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/inc/opengl')
-rw-r--r--vcl/inc/opengl/AccumulatedTextures.hxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/inc/opengl/AccumulatedTextures.hxx b/vcl/inc/opengl/AccumulatedTextures.hxx
index e74c06535f69..bc40c48f3ab0 100644
--- a/vcl/inc/opengl/AccumulatedTextures.hxx
+++ b/vcl/inc/opengl/AccumulatedTextures.hxx
@@ -88,10 +88,13 @@ public:
maEntries.clear();
}
- void insert(OpenGLTexture& rTexture, const SalColor& aColor, const SalTwoRect& r2Rect)
+ bool insert(OpenGLTexture& rTexture, const SalColor& aColor, const SalTwoRect& r2Rect)
{
GLuint nTextureId = rTexture.Id();
+ if (!rTexture)
+ return false;
+
if (maEntries.find(nTextureId) == maEntries.end())
{
OpenGLTexture aWholeTexture(rTexture.GetWholeTexture());
@@ -100,6 +103,8 @@ public:
std::unique_ptr<AccumulatedTexturesEntry>& rEntry = maEntries[nTextureId];
rEntry->insert(rTexture, aColor, r2Rect);
+
+ return true;
}
AccumulatedTexturesMap& getAccumulatedTexturesMap()