Lighthouse: Wayland, if we don't have cursors installed
authorJørgen Lind <jorgen.lind@nokia.com>
Fri, 28 Jan 2011 07:38:10 +0000 (08:38 +0100)
committerJørgen Lind <jorgen.lind@nokia.com>
Tue, 1 Feb 2011 13:38:25 +0000 (14:38 +0100)
or the configuration is faulty, then don't change cursors

src/plugins/platforms/wayland/qwaylandcursor.cpp

index f51281d..0ad0702 100644 (file)
@@ -164,6 +164,9 @@ void QWaylandCursor::changeCursor(QCursor *cursor, QWidget *widget)
 
     QImageReader reader(p->filename);
 
+    if (!reader.canRead())
+        return;
+
     if (mBuffer == NULL || mBuffer->size() != reader.size()) {
         if (mBuffer)
             delete mBuffer;