mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-02 15:45:21 +00:00
fix: fix some window preview crash
get a QImage copy data to prevent XDestroyImage clear image data which make a empty QImage log:
This commit is contained in:
parent
e8fc0b7735
commit
7a8f2c835a
@ -226,7 +226,7 @@ void AppSnapshot::fetchSnapshot()
|
||||
emit requestCheckWindow();
|
||||
return;
|
||||
}
|
||||
qimage = QImage((const uchar *)(ximage->data), ximage->width, ximage->height, ximage->bytes_per_line, QImage::Format_RGB32);
|
||||
qimage = QImage(reinterpret_cast<uchar*>(ximage->data), ximage->width, ximage->height, ximage->bytes_per_line, QImage::Format_RGB32).copy();
|
||||
}
|
||||
|
||||
Q_ASSERT(!qimage.isNull());
|
||||
|
Loading…
x
Reference in New Issue
Block a user