]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/dragimag/dragimag.cpp
Fix non-PCH builds (closes #12217)
[wxWidgets.git] / samples / dragimag / dragimag.cpp
index 0bd71e6f1b2d612e453c7ff1faadd5ae24406666..cce62bcdfa16047aa339d8fd183a844a5c07cb82 100644 (file)
@@ -135,8 +135,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event)
 
         m_dragImage->Hide();
         m_dragImage->EndDrag();
-        delete m_dragImage;
-        m_dragImage = NULL;
+        wxDELETE(m_dragImage);
 
         m_draggedShape->SetShow(true);
 
@@ -203,8 +202,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event)
 
             if (!m_dragImage->BeginDrag(beginDragHotSpot, this, fullScreen))
             {
-                delete m_dragImage;
-                m_dragImage = (wxDragImage*) NULL;
+                wxDELETE(m_dragImage);
                 m_dragMode = TEST_DRAG_NONE;
 
             } else