summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FL/Fl_Device.H2
-rw-r--r--src/Fl_Device.cxx1
2 files changed, 2 insertions, 1 deletions
diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H
index 5b6970fab..f008730c7 100644
--- a/FL/Fl_Device.H
+++ b/FL/Fl_Device.H
@@ -386,7 +386,7 @@ public:
/** Sets the current Fl_Font_Descriptor for the graphics driver */
inline void font_descriptor(Fl_Font_Descriptor *d) { font_descriptor_ = d;}
/** \brief The destructor */
- virtual ~Fl_Graphics_Driver() {};
+ virtual ~Fl_Graphics_Driver() { if (p) free(p); };
};
#if defined(__APPLE__) || defined(FL_DOXYGEN)
diff --git a/src/Fl_Device.cxx b/src/Fl_Device.cxx
index 7a70a2071..6049c16ff 100644
--- a/src/Fl_Device.cxx
+++ b/src/Fl_Device.cxx
@@ -53,6 +53,7 @@ Fl_Graphics_Driver::Fl_Graphics_Driver() {
fl_matrix = &m;
p = (XPOINT *)0;
font_descriptor_ = NULL;
+ p_size = 0;
};
void Fl_Graphics_Driver::text_extents(const char*t, int n, int& dx, int& dy, int& w, int& h)