Story Viewer: attempt to fix bug #25661

If you pressed the Next button too fast it's possible this function could fire again before the dialog actually closes
This commit is contained in:
Charles Dang 2017-04-17 01:18:47 +11:00
parent 9d2eaf5f99
commit 409404cf60

View file

@ -369,7 +369,7 @@ void story_viewer::nav_button_callback(window& window, NAV_DIRECTION direction)
part_index_ = (direction == DIR_FORWARD ? part_index_ + 1 : part_index_ -1);
// If we've viewed all the parts, close the dialog.
if(part_index_ == controller_.max_parts()) {
if(part_index_ >= controller_.max_parts()) {
window.close();
return;
}