diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2011-02-22 11:32:16 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2011-02-22 11:32:16 (GMT) |
commit | 78adeb29191b25694412e35bd5826d1689af1a6a (patch) | |
tree | 215bdec290176e6c89ef5a834ee02d743fb6e580 /src/FbTk | |
parent | 92deeba2a099ff93c0a766b2aa46454d62b19d8e (diff) | |
download | fluxbox_pavel-78adeb29191b25694412e35bd5826d1689af1a6a.zip fluxbox_pavel-78adeb29191b25694412e35bd5826d1689af1a6a.tar.bz2 |
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.
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/TextureRender.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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() { | |||
1349 | 1349 | ||
1350 | 1350 | ||
1351 | Pixmap TextureRender::render(const FbTk::Texture &texture) { | 1351 | Pixmap TextureRender::render(const FbTk::Texture &texture) { |
1352 | if (texture.pixmap().drawable() != 0) | 1352 | |
1353 | if (width == 0 || height == 0) | ||
1354 | return None; | ||
1355 | else if (texture.pixmap().drawable() != 0) | ||
1353 | return renderPixmap(texture); | 1356 | return renderPixmap(texture); |
1354 | else if (texture.type() & FbTk::Texture::PARENTRELATIVE) | 1357 | else if (texture.type() & FbTk::Texture::PARENTRELATIVE) |
1355 | return ParentRelative; | 1358 | return ParentRelative; |