Fix indirect use of fState after deleting it.
Calling SetIcon(NULL) calls MakeEmpty() that tries to delete all manipulators on fState. So we may only delete fState after that call. Also reported as CID 10856.
This commit is contained in:
parent
d86197cec3
commit
fe10dd20bf
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user