aboutsummaryrefslogtreecommitdiff
path: root/lib/gui
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-06-18 19:09:36 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-06-18 19:09:36 +0000
commitae3bc8673d79edecb8fcb918d83db011535b0955 (patch)
tree3218d825b0856692ff4c795edf734a27a9dcb5dd /lib/gui
parentf44dfc20f4ed708d67603f767a976c1168393627 (diff)
downloadenigma2-ae3bc8673d79edecb8fcb918d83db011535b0955.tar.gz
enigma2-ae3bc8673d79edecb8fcb918d83db011535b0955.zip
hopefully fix frequently segfaults
Diffstat (limited to 'lib/gui')
-rw-r--r--lib/gui/einput.cpp2
-rw-r--r--lib/gui/elabel.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/gui/einput.cpp b/lib/gui/einput.cpp
index 62a77c5d..30dc3f02 100644
--- a/lib/gui/einput.cpp
+++ b/lib/gui/einput.cpp
@@ -55,7 +55,7 @@ int eInput::event(int event, void *data, void *data2)
eDebug("cursor is %d", cursor);
para->setFont(m_font);
- para->renderString(text, 0);
+ para->renderString(text.empty()?0:text.c_str(), 0);
int glyphs = para->size();
if (m_have_focus)
diff --git a/lib/gui/elabel.cpp b/lib/gui/elabel.cpp
index 591b725a..5c8e0b77 100644
--- a/lib/gui/elabel.cpp
+++ b/lib/gui/elabel.cpp
@@ -36,7 +36,7 @@ int eLabel::event(int event, void *data, void *data2)
style->setStyle(painter, eWindowStyle::styleLabel);
ePtr<eTextPara> para = new eTextPara(eRect(0, 0, size().width(), size().height()));
para->setFont(m_font);
- para->renderString(m_text, 0);
+ para->renderString(m_text.empty()?0:m_text.c_str(), 0);
para->realign(eTextPara::dirLeft);
int glyphs = para->size();
@@ -185,7 +185,7 @@ eSize eLabel::calculateSize()
ePtr<eTextPara> p = new eTextPara(eRect(0, 0, size().width(), size().height()));
p->setFont(m_font);
- p->renderString(m_text, RS_WRAP);
+ p->renderString(m_text.empty()?0:m_text.c_str(), RS_WRAP);
eRect bbox = p->getBoundBox();
return bbox.size();