Skip to content

Commit 5130d33

Browse files
committed
Fix crash
1 parent cb6ac89 commit 5130d33

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/nimble/app.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,11 @@ void na::Application::Draw()
175175
break;
176176
}
177177
}
178-
for (int i = pageStartIndex; i < (int)m_pages.len(); i++) {
179-
PageWidget* page = m_pages[i];
180-
page->Draw(m_nvg);
178+
if (pageStartIndex >= 0) {
179+
for (int i = pageStartIndex; i < (int)m_pages.len(); i++) {
180+
PageWidget* page = m_pages[i];
181+
page->Draw(m_nvg);
182+
}
181183
}
182184

183185
nvgEndFrame(m_nvg);

0 commit comments

Comments
 (0)