aboutsummaryrefslogtreecommitdiff
path: root/src/Shape.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-01-21 17:01:27 (GMT)
committerfluxgen <fluxgen>2004-01-21 17:01:27 (GMT)
commitf7f454524d711624f44eedfc84c2eeab0c144c56 (patch)
treeaf23c657eece401bc7c9a9596cd298e93170a5fc /src/Shape.cc
parent3cf9619a920e1c6235a183033298efad60a99fc4 (diff)
downloadfluxbox-f7f454524d711624f44eedfc84c2eeab0c144c56.zip
fluxbox-f7f454524d711624f44eedfc84c2eeab0c144c56.tar.bz2
check memory allocation
Diffstat (limited to 'src/Shape.cc')
-rw-r--r--src/Shape.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Shape.cc b/src/Shape.cc
index de03ab2..dda869c 100644
--- a/src/Shape.cc
+++ b/src/Shape.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Shape.cc,v 1.9 2004/01/11 15:02:11 fluxgen Exp $ 22// $Id: Shape.cc,v 1.10 2004/01/21 17:01:27 fluxgen Exp $
23 23
24#include "Shape.hh" 24#include "Shape.hh"
25 25
@@ -62,6 +62,9 @@ FbTk::FbPixmap *createShape(FbTk::FbWindow &win, int place) {
62 // we use calloc here so we get consistent C alloc/free with XDestroyImage 62 // we use calloc here so we get consistent C alloc/free with XDestroyImage
63 // and no warnings in valgrind :) 63 // and no warnings in valgrind :)
64 char *data = (char *)calloc(data_size, sizeof (char)); 64 char *data = (char *)calloc(data_size, sizeof (char));
65 if (data == 0)
66 return 0;
67
65 memset(data, 0xFF, data_size); 68 memset(data, 0xFF, data_size);
66 69
67 XImage *ximage = XCreateImage(disp, 70 XImage *ximage = XCreateImage(disp,