mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-09 22:56:53 +00:00
Solve a segfault with piece animations
This commit is contained in:
parent
8e83bfb673
commit
179a173b3b
1 changed files with 10 additions and 8 deletions
|
@ -94,6 +94,7 @@ void GameTabLeftPanel::Notify(bool skip_animation) {
|
||||||
// Update capture and check if we should to animations during moves change:
|
// Update capture and check if we should to animations during moves change:
|
||||||
if (m){
|
if (m){
|
||||||
captures = m->GetLineCaptures();
|
captures = m->GetLineCaptures();
|
||||||
|
if(!m->IsVariation()){ // Animations can lead to segfault when clicking on CGEditor move
|
||||||
if(m->HasParent(last_move)){
|
if(m->HasParent(last_move)){
|
||||||
m->GetAbsoluteMove(src,dst);
|
m->GetAbsoluteMove(src,dst);
|
||||||
animate=true;
|
animate=true;
|
||||||
|
@ -103,6 +104,7 @@ void GameTabLeftPanel::Notify(bool skip_animation) {
|
||||||
last_move->GetAbsoluteMove(dst,src);
|
last_move->GetAbsoluteMove(dst,src);
|
||||||
animate=true;
|
animate=true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if(game->GetNextMove()){ // First move animation
|
} else if(game->GetNextMove()){ // First move animation
|
||||||
HalfMove *next=game->GetNextMove();
|
HalfMove *next=game->GetNextMove();
|
||||||
if(next==last_move){
|
if(next==last_move){
|
||||||
|
|
Loading…
Add table
Reference in a new issue