mirror of
https://gitlab.com/manzerbredes/cgeditor.git
synced 2025-04-07 02:26:27 +02:00
Ensure move pointer is not nullptr
This commit is contained in:
parent
5ceb3eafc4
commit
3594a12bb4
1 changed files with 1 additions and 1 deletions
|
@ -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){
|
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;
|
X=MovesStates[m].Bound.x;
|
||||||
Y=MovesStates[m].Bound.y;
|
Y=MovesStates[m].Bound.y;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue