summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-01-05 22:36:28 (GMT)
committerfluxgen <fluxgen>2003-01-05 22:36:28 (GMT)
commit1af005c78eed186ec79b49e86c35fc09f8ecca37 (patch)
tree47d9984746f71b5e33f4311f0465a6f7fe6252a2 /src
parent64bf9a94fe57c629e59846b4d634d734a5267882 (diff)
downloadfluxbox_lack-1af005c78eed186ec79b49e86c35fc09f8ecca37.zip
fluxbox_lack-1af005c78eed186ec79b49e86c35fc09f8ecca37.tar.bz2
no need to crash n burn because of stupid size
Diffstat (limited to 'src')
-rw-r--r--src/TextureRender.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/TextureRender.cc b/src/TextureRender.cc
index 692984f..d3ef8f6 100644
--- a/src/TextureRender.cc
+++ b/src/TextureRender.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: TextureRender.cc,v 1.6 2002/12/09 23:43:50 fluxgen Exp $ 25// $Id: TextureRender.cc,v 1.7 2003/01/05 22:36:28 fluxgen Exp $
26 26
27#include "TextureRender.hh" 27#include "TextureRender.hh"
28 28
@@ -45,6 +45,16 @@ TextureRender::TextureRender(BImageControl &imgctrl,
45 45
46 width = ((signed) w > 0) ? w : 1; 46 width = ((signed) w > 0) ? w : 1;
47 height = ((signed) h > 0) ? h : 1; 47 height = ((signed) h > 0) ? h : 1;
48 // clamp to "normal" size
49 if (width > 3200) {
50 cerr<<"TextureRender: Warning! Width > 3200 setting Width = 3200"<<endl;
51 width = 3200;
52 }
53
54 if (height > 3200) {
55 cerr<<"TextureRender: Warning! Height > 3200 setting Height = 3200"<<endl;
56 height = 3200;
57 }
48 58
49 red = new (nothrow) unsigned char[width * height]; 59 red = new (nothrow) unsigned char[width * height];
50 if (red == 0) { 60 if (red == 0) {