Commit 74bba5fd authored by David Faure's avatar David Faure

Fix crash in X11ImageGrabber::getDrawableGeometry.

It might be that this happens because my kwin crashed, but anyway,
easy null-pointer check to prevent spectacle from crashing too.
parent c9469b53
......@@ -599,7 +599,9 @@ QRect X11ImageGrabber::getDrawableGeometry(xcb_drawable_t drawable)
xcb_get_geometry_cookie_t geomCookie = xcb_get_geometry_unchecked(xcbConn, drawable);
CScopedPointer<xcb_get_geometry_reply_t> geomReply(xcb_get_geometry_reply(xcbConn, geomCookie, NULL));
if (geomReply.isNull()) {
return QRect();
return QRect(geomReply->x, geomReply->y, geomReply->width, geomReply->height);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment