Skip to content

Commit

Permalink
fix VM abort in text view when no weapons
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaulwurff committed Aug 11, 2021
1 parent ff654fb commit 5db09e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zscript/gearbox/display/text_view.zs
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ class gb_TextView

void display(gb_ViewModel viewModel) const
{
uint nWeapons = viewModel.tags.size();
if (nWeapons == 0) return;

vector2 start = mOptions.getTextPosition();
start.x *= mScreenWidth;
start.y *= mScreenHeight;
double x = start.x;
double y = start.y;
double lineHeight = NewSmallFont.getHeight();
uint nWeapons = viewModel.tags.size();
int usualColor = mOptions.getTextUsualColor();
int selectedColor = mOptions.getTextSelectedColor();
Font aFont = NewSmallFont;
Expand Down

0 comments on commit 5db09e5

Please sign in to comment.