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

Modified:
   branches/branch-3.0/include/fltk3/Device.h
   branches/branch-3.0/src/fltk3/Device.cxx

Modified: branches/branch-3.0/include/fltk3/Device.h
===================================================================
--- branches/branch-3.0/include/fltk3/Device.h  2012-02-16 13:09:34 UTC (rev 
9235)
+++ branches/branch-3.0/include/fltk3/Device.h  2012-02-16 13:18:14 UTC (rev 
9236)
@@ -326,7 +326,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 ~GraphicsDriver() {};
+    virtual ~GraphicsDriver() { if (p) free(p); };
   };
   
 #if defined(__APPLE__) || defined(FLTK3_DOXYGEN)

Modified: branches/branch-3.0/src/fltk3/Device.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/Device.cxx    2012-02-16 13:09:34 UTC (rev 
9235)
+++ branches/branch-3.0/src/fltk3/Device.cxx    2012-02-16 13:18:14 UTC (rev 
9236)
@@ -64,6 +64,7 @@
   fl_matrix = &m; 
   p = (XPOINT *)0;
   font_descriptor_ = NULL;
+  p_size = 0;
 };
 
 void fltk3::GraphicsDriver::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