diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-05-03 18:57:05 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-05-03 18:57:05 +0000 |
| commit | 5c30e18bc4e27a6814545d6dade5fc48884a7c0e (patch) | |
| tree | 8ac5a150c25563416e0651b5f8d7924d2e4ba051 /lib/gui | |
| parent | 219139e42996b26a001728406825d87fbdba6e0d (diff) | |
| download | enigma2-5c30e18bc4e27a6814545d6dade5fc48884a7c0e.tar.gz enigma2-5c30e18bc4e27a6814545d6dade5fc48884a7c0e.zip | |
add missing content avail checks
Diffstat (limited to 'lib/gui')
| -rw-r--r-- | lib/gui/elistbox.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gui/elistbox.cpp b/lib/gui/elistbox.cpp index cfb3d5b4..65b24503 100644 --- a/lib/gui/elistbox.cpp +++ b/lib/gui/elistbox.cpp @@ -78,6 +78,8 @@ bool eListbox::atEnd() void eListbox::moveToEnd() { + if (!m_content) + return; /* move to last existing one ("end" is already invalid) */ m_content->cursorEnd(); m_content->cursorMove(-1); /* current selection invisible? */ @@ -363,7 +365,8 @@ void eListbox::recalcSize() { m_content_changed=true; m_prev_scrollbar_page=-1; - m_content->setSize(eSize(size().width(), m_itemheight)); + if (m_content) + m_content->setSize(eSize(size().width(), m_itemheight)); m_items_per_page = size().height() / m_itemheight; if (m_items_per_page < 0) /* TODO: whyever - our size could be invalid, or itemheigh could be wrongly specified. */ @@ -413,7 +416,7 @@ void eListbox::entryAdded(int index) void eListbox::entryRemoved(int index) { - if (index == m_selected) + if (index == m_selected && m_content) m_selected = m_content->cursorGet(); moveSelection(justCheck); |
