From 3594a12bb4a4bc8724a6c3d592487a66f586df20 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 7 Jun 2023 11:38:09 +0200 Subject: [PATCH] Ensure move pointer is not nullptr --- src/components/MoveTable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MoveTable.cpp b/src/components/MoveTable.cpp index b92cf76..5b654c6 100644 --- a/src/components/MoveTable.cpp +++ b/src/components/MoveTable.cpp @@ -351,7 +351,7 @@ std::uint32_t MoveTable::DrawVariations(CMI::HalfMove *m, std::uint32_t line, } void MoveTable::GetMoveXY(CMI::HalfMove* m, double &X, double &Y){ - if(MovesStates.count(m)>0){ + if(m != nullptr && MovesStates.count(m)>0){ X=MovesStates[m].Bound.x; Y=MovesStates[m].Bound.y; }