Commit 3bcccfda authored by Laurent Montel's avatar Laurent Montel 😁

not necessary to check pointer before deleting it

parent 4532d90a
......@@ -489,10 +489,8 @@ void Manager::reset() {
d->usedOfferIds.clear();
d->winner = NoColor;
if ( d->extControl ) {
delete d->extControl;
d->extControl = nullptr;
}
delete d->extControl;
d->extControl = nullptr;
}
Rules* Manager::rules() const {
......@@ -502,8 +500,7 @@ Rules* Manager::rules() const {
void Manager::setRules(Rules* rules) {
Q_D(GameManager);
if (d->rules)
delete d->rules;
delete d->rules;
d->rules = rules;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment