experimental boarder width fix
[enigma2.git] / lib / gui / epixmap.cpp
index 31998c1efa61325c0ca60320e04ea36807bb95b4..4e15b4eb5ba85c956b149348c0596be040381ced 100644 (file)
@@ -22,9 +22,15 @@ void ePixmap::setPixmap(gPixmap *pixmap)
 void ePixmap::setPixmapFromFile(const char *filename)
 {
        loadPNG(m_pixmap, filename);
-               
-               // TODO
-       getDesktop()->makeCompatiblePixmap(*m_pixmap);
+       
+       if (!m_pixmap)
+       {
+               eDebug("ePixmap::setPixmapFromFile: loadPNG failed");
+               return;
+       }
+       
+               // TODO: This only works for desktop 0
+       getDesktop(0)->makeCompatiblePixmap(*m_pixmap);
        event(evtChangedPixmap);
 }