Author: manolo
Date: 2012-02-16 05:09:34 -0800 (Thu, 16 Feb 2012)
New Revision: 9235
Log:
Added missing initialization/deallocation of member variables of class 
Fl_Graphics_Driver

Modified:
   branches/branch-1.3/FL/Fl_Device.H
   branches/branch-1.3/src/Fl_Device.cxx

Modified: branches/branch-1.3/FL/Fl_Device.H
===================================================================
--- branches/branch-1.3/FL/Fl_Device.H  2012-02-13 22:09:14 UTC (rev 9234)
+++ branches/branch-1.3/FL/Fl_Device.H  2012-02-16 13:09:34 UTC (rev 9235)
@@ -386,7 +386,7 @@
   /** 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)

Modified: branches/branch-1.3/src/Fl_Device.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Device.cxx       2012-02-13 22:09:14 UTC (rev 
9234)
+++ branches/branch-1.3/src/Fl_Device.cxx       2012-02-16 13:09:34 UTC (rev 
9235)
@@ -53,6 +53,7 @@
   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)

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to