diff --git a/src/apps/icon-o-matic/MainWindow.cpp b/src/apps/icon-o-matic/MainWindow.cpp index 3e5242e1e8..85190453ec 100644 --- a/src/apps/icon-o-matic/MainWindow.cpp +++ b/src/apps/icon-o-matic/MainWindow.cpp @@ -126,10 +126,10 @@ MainWindow::MainWindow(BRect frame, IconEditorApp* app, MainWindow::~MainWindow() { - delete fState; - SetIcon(NULL); + delete fState; + // Make sure there are no listeners attached to the document anymore. while (BView* child = ChildAt(0L)) { child->RemoveSelf();