mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-29 19:20:28 +00:00
Fixed NULL dereference.
This commit is contained in:
parent
f7039b9a25
commit
10998add43
3
src/3rdparty/win32_include/curses.h
vendored
3
src/3rdparty/win32_include/curses.h
vendored
@ -136,7 +136,8 @@ enum PDC_port
|
||||
PDC_PORT_OS2 = 4,
|
||||
PDC_PORT_SDL1 = 5,
|
||||
PDC_PORT_SDL2 = 6,
|
||||
PDC_PORT_VT = 7
|
||||
PDC_PORT_VT = 7,
|
||||
PDC_PORT_DOSVGA = 8
|
||||
};
|
||||
|
||||
/* Use this structure with PDC_get_version() for run-time info about the
|
||||
|
@ -111,6 +111,11 @@ size_t ScrollAdapterBase::GetVisibleItems(
|
||||
|
||||
void ScrollAdapterBase::DrawPage(ScrollableWindow* scrollable, size_t index, ScrollPosition& result) {
|
||||
WINDOW* window = scrollable->GetContent();
|
||||
|
||||
if (!window) {
|
||||
return;
|
||||
}
|
||||
|
||||
werase(window);
|
||||
|
||||
if (!scrollable->IsVisible() || !window || this->height == 0 || this->width == 0 || this->GetEntryCount() == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user