diff --git a/src/apps/showimage/ImageCache.cpp b/src/apps/showimage/ImageCache.cpp index 706dd21be3..0f6ef23c1d 100644 --- a/src/apps/showimage/ImageCache.cpp +++ b/src/apps/showimage/ImageCache.cpp @@ -318,7 +318,7 @@ ImageCache::_NotifyListeners(CacheEntry* entry, QueueEntry* queueEntry) std::set::iterator iterator = queueEntry->listeners.begin(); for (; iterator != queueEntry->listeners.end(); iterator++) { - if (iterator->SendMessage(¬ification) == B_OK) { + if (iterator->SendMessage(¬ification) == B_OK && entry != NULL) { entry->bitmapOwner->AcquireReference(); // this is the reference owned by the target } @@ -335,7 +335,7 @@ ImageCache::_NotifyTarget(CacheEntry* entry, const BMessenger* target) BMessage notification(kMsgImageCacheImageLoaded); _BuildNotification(entry, notification); - if (target->SendMessage(¬ification) == B_OK) { + if (target->SendMessage(¬ification) == B_OK && entry != NULL) { entry->bitmapOwner->AcquireReference(); // this is the reference owned by the target }