summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-03-26 23:18:44 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-03-26 23:18:44 +0100
commit560206eb534ac789adc9c7fc17437522334ac713 (patch)
treeb346d9d0d088dfea7b21f0590868a9a80067cc12
parente6f3d640f4f2312c5c3b796e12e9ee785a87f4e4 (diff)
delete[] rgb buffer
-rw-r--r--src/ScreenDump.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ScreenDump.cxx b/src/ScreenDump.cxx
index d238535..c1643d7 100644
--- a/src/ScreenDump.cxx
+++ b/src/ScreenDump.cxx
@@ -1,5 +1,3 @@
-#include <stdlib.h>
-
#include <FL/Fl.H>
#include <FL/x.H>
#include <FL/fl_draw.H>
@@ -23,7 +21,8 @@ ScreenDump::ScreenDump(GipfelWidget *gipf) {
}
ScreenDump::~ScreenDump() {
- free(rgb);
+ if (rgb)
+ delete[] rgb;
}
int