From 477febec7b5f4c8f1eafeecd0711793ca690ba15 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Thu, 16 Feb 2012 13:09:34 +0000 Subject: Added missing initialization/deallocation of member variables of class Fl_Graphics_Driver git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9235 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Device.H | 2 +- src/Fl_Device.cxx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3