]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/gdi.cpp
Fixed/simplified Makefile
[wxWidgets.git] / wxPython / src / gtk / gdi.cpp
index 199a67566d4affcf09fad9e921a83ef95b06ae90..ab7f5ed4c6d1d602426123ba9d9d248cd186373a 100644 (file)
@@ -190,13 +190,16 @@ public:
         { m_dash = NULL; }
     ~wxPyPen() {
         if (m_dash)
-            delete m_dash;
+            delete [] m_dash;
     }
 
     void SetDashes(int nb_dashes, const wxDash *dash) {
+        if (m_dash)
+            delete [] m_dash;
         m_dash = new wxDash[nb_dashes];
-        for (int i=0; i<nb_dashes; i++)
+        for (int i=0; i<nb_dashes; i++) {
             m_dash[i] = dash[i];
+        }
         wxPen::SetDashes(nb_dashes, m_dash);
     }