From 8e6c1d52ed9c233e753fc93bec93c8d909c95002 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 14 Oct 2009 14:25:09 +0200 Subject: Add an assert testing the cleanup hooks exist before executing them Reviewed-By: TrustMe --- src/gui/image/qimagepixmapcleanuphooks.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/image/qimagepixmapcleanuphooks.cpp b/src/gui/image/qimagepixmapcleanuphooks.cpp index 138eb0d..ac30646 100644 --- a/src/gui/image/qimagepixmapcleanuphooks.cpp +++ b/src/gui/image/qimagepixmapcleanuphooks.cpp @@ -124,6 +124,7 @@ void QImagePixmapCleanupHooks::executePixmapDestructionHooks(QPixmap* pm) void QImagePixmapCleanupHooks::executeImageHooks(qint64 key) { + Q_ASSERT(qt_image_and_pixmap_cleanup_hooks); for (int i = 0; i < qt_image_and_pixmap_cleanup_hooks->imageHooks.count(); ++i) qt_image_and_pixmap_cleanup_hooks->imageHooks[i](key); -- cgit v0.12