Prevent crash in QXcbIntegration::grabWindow().

Copy the image explicitly before calling QPixmap::fromImage().
This commit is contained in:
Samuel Rødal 2011-06-03 13:54:08 +02:00
parent e99ab7de9b
commit daa707ebf7

View File

@ -330,8 +330,7 @@ QPixmap QXcbIntegration::grabWindow(WId window, int x, int y, int width, int hei
}
}
image.detach();
result = QPixmap::fromImage(image);
result = QPixmap::fromImage(image.copy());
}
free(image_reply);