Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In reference to Issue #3767 #3967

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/itemdrag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ void ItemDrag::__dragIsDone() {
}

void ItemDrag::cleanup() {
if (Singleton) {
delete Singleton;
Singleton = NULL;
}
delete Singleton;
Singleton = NULL;
}

QHash<QObject *, QObject *> & ItemDrag::cache() {
Expand Down
4 changes: 2 additions & 2 deletions src/partsbinpalette/partsbinpalettewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ PartsBinPaletteWidget::~PartsBinPaletteWidget() {
m_model = NULL;
}

if (m_icon) delete m_icon;
if (m_monoIcon) delete m_monoIcon;
delete m_icon;
delete m_monoIcon;
}

void PartsBinPaletteWidget::cleanup() {
Expand Down
13 changes: 5 additions & 8 deletions src/partsbinpalette/svgiconwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,11 @@ void SvgIconWidget::initNames() {
}

void SvgIconWidget::cleanup() {
if (PluralImage) {
delete PluralImage;
PluralImage = nullptr;
}
if (SingularImage) {
delete SingularImage;
SingularImage = nullptr;
}
delete PluralImage;
delete SingularImage;

PluralImage = nullptr;
SingularImage = nullptr;
}

ItemBase *SvgIconWidget::itemBase() const noexcept {
Expand Down