Skip to content

Crashes on destruction #242

Closed
Closed
@tsdgeos

Description

@tsdgeos
  • Run spectacle
  • Close spectacle
  • Crash

There is too much deleting of widgets and layouts going on, in particular the issue seems to be in FontPicker but there's too many deletes everywhere. In Qt you don't need to delete widgets or layouts to which you have given a parent, the destructor will take care of deleting them, you can delete them manually but you have to be careful of not double deleting, i.e if you delete mLayout, that will already delete mButtonLayout because it is it's child mLayout->addLayout(mButtonLayout) so when you do later delete mButtonLayout again it crashes because you have already deleted it.

My suggestion would be to not do manual deleting of QWidgets and just left the parent/child relationship cleanup everything.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions