- // use direct filename for absolute path or relative to enigma2 DATADIR otherwise
- if (filename[0] == '/')
- loadPNG(m_pixmap, filename);
- else
- loadPNG(m_pixmap, strcat(DATADIR "/enigma2/", filename));
-
- // TODO
- getDesktop()->makeCompatiblePixmap(*m_pixmap);
+ loadPNG(m_pixmap, filename);
+
+ if (!m_pixmap)
+ {
+ eDebug("ePixmap::setPixmapFromFile: loadPNG failed");
+ return;
+ }
+
+ // TODO: This only works for desktop 0
+ getDesktop(0)->makeCompatiblePixmap(*m_pixmap);