summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-03-09 13:02:25 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-03-10 12:15:05 (GMT)
commitde66b772294e314828d85cb9cdd5db82221f317a (patch)
tree41a72d3ffd642c29acc510e435e9126629d2c272
parent8dd695793dd41dc57ded6506aadbd23786e11cf4 (diff)
downloadQt-de66b772294e314828d85cb9cdd5db82221f317a.zip
Qt-de66b772294e314828d85cb9cdd5db82221f317a.tar.gz
Qt-de66b772294e314828d85cb9cdd5db82221f317a.tar.bz2
Added check for null pointer in qt_vg_unregister_pixmap.
The method qt_vg_unregister_pixmap is sometimes called when the QVGSharedContext is already destroyed. Do not try to access it if it is null. Part of QtP delta reduction effort. Reviewed-by: Jason Barron
-rw-r--r--src/openvg/qwindowsurface_vgegl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp
index 9c44545..693312a 100644
--- a/src/openvg/qwindowsurface_vgegl.cpp
+++ b/src/openvg/qwindowsurface_vgegl.cpp
@@ -177,7 +177,8 @@ void qt_vg_unregister_pixmap(QVGPixmapData *pd)
pd->prev->next = pd->next;
} else {
QVGSharedContext *shared = sharedContext();
- shared->firstPixmap = pd->next;
+ if (shared)
+ shared->firstPixmap = pd->next;
}
}