From 78adeb29191b25694412e35bd5826d1689af1a6a Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Tue, 22 Feb 2011 12:32:16 +0100 Subject: Bugfix: don't render textures with dimension of 0 At least 'invertRGB()' does not like 'width' or 'height' being 0. 341b2f43e511e39dd was triggered by this problem as well. --- src/FbTk/TextureRender.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/FbTk/TextureRender.cc b/src/FbTk/TextureRender.cc index 7b808af..c66dfa7 100644 --- a/src/FbTk/TextureRender.cc +++ b/src/FbTk/TextureRender.cc @@ -1349,7 +1349,10 @@ TextureRender::~TextureRender() { Pixmap TextureRender::render(const FbTk::Texture &texture) { - if (texture.pixmap().drawable() != 0) + + if (width == 0 || height == 0) + return None; + else if (texture.pixmap().drawable() != 0) return renderPixmap(texture); else if (texture.type() & FbTk::Texture::PARENTRELATIVE) return ParentRelative; -- cgit v0.11.2