diff --git a/src/musikcube/cursespp/ScrollAdapterBase.cpp b/src/musikcube/cursespp/ScrollAdapterBase.cpp index b3e5856de..8f61292e5 100755 --- a/src/musikcube/cursespp/ScrollAdapterBase.cpp +++ b/src/musikcube/cursespp/ScrollAdapterBase.cpp @@ -112,16 +112,12 @@ size_t ScrollAdapterBase::GetVisibleItems( void ScrollAdapterBase::DrawPage(ScrollableWindow* scrollable, size_t index, ScrollPosition& result) { WINDOW* window = scrollable->GetContent(); - if (!window) { + if (!scrollable->IsVisible() || !window || this->height == 0 || this->width == 0 || this->GetEntryCount() == 0) { return; } werase(window); - if (!scrollable->IsVisible() || !window || this->height == 0 || this->width == 0 || this->GetEntryCount() == 0) { - return; - } - if (index >= GetEntryCount()) { index = GetEntryCount() - 1; }