aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/MoveTable.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/components/MoveTable.cpp b/src/components/MoveTable.cpp
index 88767b1..b92cf76 100644
--- a/src/components/MoveTable.cpp
+++ b/src/components/MoveTable.cpp
@@ -351,7 +351,14 @@ std::uint32_t MoveTable::DrawVariations(CMI::HalfMove *m, std::uint32_t line,
}
void MoveTable::GetMoveXY(CMI::HalfMove* m, double &X, double &Y){
- X=MovesStates.at(m).Bound.x;
- Y=MovesStates.at(m).Bound.y;
+ if(MovesStates.count(m)>0){
+ X=MovesStates[m].Bound.x;
+ Y=MovesStates[m].Bound.y;
+ }
+ else {
+ // Being predictable:
+ X=0;
+ Y=0;
+ }
}
} // namespace cgeditor \ No newline at end of file