X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3cb332c1553bb977cb8db16c19c733684ef72805..c6aabd1ca9a5590d5dd8e89d83a5fba74c69c931:/samples/dragimag/dragimag.cpp diff --git a/samples/dragimag/dragimag.cpp b/samples/dragimag/dragimag.cpp index 0bd71e6f1b..cce62bcdfa 100644 --- a/samples/dragimag/dragimag.cpp +++ b/samples/dragimag/dragimag.cpp @@ -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