summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-11-23 11:03:43 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-11-23 11:03:46 (GMT)
commit366af17676a87943c8a7c2380a8819bdd3815878 (patch)
tree378efb9fe91abd68be687780276dbcffbf6eb457 /src/gui/image
parent9619f5e27cbed9b45188112c934733e9f069b8ca (diff)
parentb7692016f282251002b3e85dfcb5567bd91a12c0 (diff)
downloadQt-366af17676a87943c8a7c2380a8819bdd3815878.zip
Qt-366af17676a87943c8a7c2380a8819bdd3815878.tar.gz
Qt-366af17676a87943c8a7c2380a8819bdd3815878.tar.bz2
Merge commit 'b7692016f282251002b3e85dfcb5567bd91a12c0' of oslo-staging-1 into 4.6
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qnativeimage.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index e4ea2e9..3b43ab6 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -178,6 +178,8 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /*
if (ok) {
xshmimg->data = (char*)shmat(xshminfo.shmid, 0, 0);
xshminfo.shmaddr = xshmimg->data;
+ if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1)
+ qWarning() << "Error while marking the shared memory segment to be destroyed";
ok = (xshminfo.shmaddr != (char*)-1);
if (ok)
image = QImage((uchar *)xshmimg->data, width, height, systemFormat());