Skip to content

Commit

Permalink
Make sure visit_eos() happens even if the log is truncated.
Browse files Browse the repository at this point in the history
Otherwise, altrace_wx ends up not snapshotting the final API call, causing
a crash if you click on it.
  • Loading branch information
icculus committed Sep 15, 2019
1 parent 5574f0a commit 05fbccf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions altrace_playback.c
Expand Up @@ -1963,7 +1963,6 @@ int process_tracelog(const char *fname, void *userdata)
}

if (io_failure) {
visit_eos(guserdata, AL_FALSE, 0);
retval = 0;
eos = 1;
break;
Expand Down Expand Up @@ -2047,13 +2046,19 @@ int process_tracelog(const char *fname, void *userdata)
break;

default:
visit_eos(guserdata, AL_FALSE, 0);
if (!io_failure) {
visit_eos(guserdata, AL_FALSE, 0);
}
retval = 0;
eos = 1;
break;
}
}

if (io_failure) {
visit_eos(guserdata, AL_FALSE, 0);
}

quit_altrace_playback();

return retval;
Expand Down

0 comments on commit 05fbccf

Please sign in to comment.