Skip to content

Commit

Permalink
FIX: Crash when the credits come to an end
Browse files Browse the repository at this point in the history
  • Loading branch information
jamespetts committed Nov 11, 2017
1 parent 81e287e commit 50f6758
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions gui/banner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ void banner_t::draw(scr_coord pos, scr_size size )
color = colors[0];
}

if (scrolltext[text_line + row * 2 + 1] == NULL)
{
break;
}

if( row == L_BANNER_ROWS || row == 0 ) {
display_proportional_clip( left + L_BANNER_TEXT_INDENT, cursor.y - text_offset, scrolltext[text_line + row*2 ], ALIGN_LEFT, color, false);
display_proportional_clip( left + width - L_BANNER_TEXT_INDENT, cursor.y - text_offset, scrolltext[text_line + row*2 + 1], ALIGN_RIGHT, color, false);
Expand Down
2 changes: 1 addition & 1 deletion scrolltext.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,4 @@
"","",
"","",
"","",
0
0

0 comments on commit 50f6758

Please sign in to comment.