diff --git a/Piece.cpp b/Piece.cpp index 79c09e6..2ced144 100644 --- a/Piece.cpp +++ b/Piece.cpp @@ -58,7 +58,7 @@ std::vector Rook::getLegalMoves(const Square &from, const Board &board) co if (!target) { moveList.push_back({from, targetSquare}); - } else if (target->getColour() != this->getColour()) { + } else if (target && target->getColour() != this->getColour()) { moveList.push_back({from, targetSquare}); break; diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml index 5295c65..fb8d13d 100644 --- a/nbproject/configurations.xml +++ b/nbproject/configurations.xml @@ -39,6 +39,10 @@ NeoPixel.cpp + + . + inc + Makefile diff --git a/nbproject/project.xml b/nbproject/project.xml index 50d0ea8..23e2470 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -8,7 +8,10 @@ 0 UTF-8 - + + . + inc + Debug