mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-07 02:26:29 +02: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:
|
||||
if (m){
|
||||
captures = m->GetLineCaptures();
|
||||
if(!m->IsVariation()){ // Animations can lead to segfault when clicking on CGEditor move
|
||||
if(m->HasParent(last_move)){
|
||||
m->GetAbsoluteMove(src,dst);
|
||||
animate=true;
|
||||
|
@ -103,6 +104,7 @@ void GameTabLeftPanel::Notify(bool skip_animation) {
|
|||
last_move->GetAbsoluteMove(dst,src);
|
||||
animate=true;
|
||||
}
|
||||
}
|
||||
} else if(game->GetNextMove()){ // First move animation
|
||||
HalfMove *next=game->GetNextMove();
|
||||
if(next==last_move){
|
||||
|
|
Loading…
Add table
Reference in a new issue