aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/TextureRender.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-01-21 20:19:50 (GMT)
committerfluxgen <fluxgen>2004-01-21 20:19:50 (GMT)
commit8963045bd71832d253662e528d73f3d0bded6ad1 (patch)
treece1188f6f56ee441f848553ec4a534be69d496f5 /src/FbTk/TextureRender.cc
parent377cfbeceb0986d916444529d5ee719b8b5b8dfc (diff)
downloadfluxbox-8963045bd71832d253662e528d73f3d0bded6ad1.zip
fluxbox-8963045bd71832d253662e528d73f3d0bded6ad1.tar.bz2
nothrow
Diffstat (limited to 'src/FbTk/TextureRender.cc')
-rw-r--r--src/FbTk/TextureRender.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/FbTk/TextureRender.cc b/src/FbTk/TextureRender.cc
index 6525d71..3e56e88 100644
--- a/src/FbTk/TextureRender.cc
+++ b/src/FbTk/TextureRender.cc
@@ -1,5 +1,5 @@
1// TextureRender.cc for fluxbox 1// TextureRender.cc for fluxbox
2// Copyright (c) 2002 - 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net) 2// Copyright (c) 2002 - 2004 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3// 3//
4// from Image.cc for Blackbox - an X11 Window manager 4// from Image.cc for Blackbox - an X11 Window manager
5// Copyright (c) 1997 - 2000 Brad Hughes (bhughes at tcac.net) 5// Copyright (c) 1997 - 2000 Brad Hughes (bhughes at tcac.net)
@@ -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.7 2004/01/21 14:16:41 fluxgen Exp $ 25// $Id: TextureRender.cc,v 1.8 2004/01/21 20:19:50 fluxgen Exp $
26 26
27#include "TextureRender.hh" 27#include "TextureRender.hh"
28 28
@@ -59,7 +59,7 @@ TextureRender::TextureRender(ImageControl &imgctrl,
59 height = 3200; 59 height = 3200;
60 } 60 }
61 61
62 red = new unsigned char[width * height]; 62 red = new(nothrow) unsigned char[width * height];
63 if (red == 0) { 63 if (red == 0) {
64 char sbuf[128]; 64 char sbuf[128];
65 sprintf(sbuf, "%d", width*height); 65 sprintf(sbuf, "%d", width*height);
@@ -67,14 +67,14 @@ TextureRender::TextureRender(ImageControl &imgctrl,
67 } 67 }
68 68
69 69
70 green = new unsigned char[width * height]; 70 green = new(nothrow) unsigned char[width * height];
71 if (green == 0) { 71 if (green == 0) {
72 char sbuf[128]; 72 char sbuf[128];
73 sprintf(sbuf, "%d", width*height); 73 sprintf(sbuf, "%d", width*height);
74 throw string("TextureRender::TextureRender(): Out of memory while allocating green buffer. size " + string(sbuf)); 74 throw string("TextureRender::TextureRender(): Out of memory while allocating green buffer. size " + string(sbuf));
75 } 75 }
76 76
77 blue = new unsigned char[width * height]; 77 blue = new(nothrow) unsigned char[width * height];
78 if (blue == 0) { 78 if (blue == 0) {
79 char sbuf[128]; 79 char sbuf[128];
80 sprintf(sbuf, "%d", width*height); 80 sprintf(sbuf, "%d", width*height);