From de66b772294e314828d85cb9cdd5db82221f317a Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 9 Mar 2010 15:02:25 +0200 Subject: 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 --- src/openvg/qwindowsurface_vgegl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } } -- cgit v0.12