fix crash on nullptr
This commit is contained in:
parent
7f59b11975
commit
96c2ea501a
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ void Plateau::modifierSelection(const int x, const int y) {
|
|||
}
|
||||
|
||||
Piece *p = getPiece(x, y);
|
||||
if (p != selection) {
|
||||
if (p && p != selection) {
|
||||
// Si la sélection à changer alors changer l'état de la nouvelle pièce
|
||||
p->changeSelection();
|
||||
selection = p;
|
||||
|
|
Reference in a new issue