My guess is that you have a double delete somewhere. You are deleting some object explicitly and then MainWindow destructor deletes it again.