Context *on_finish) {
assert(m_image_ctx.test_features(RBD_FEATURE_OBJECT_MAP));
assert(m_image_ctx.owner_lock.is_locked());
+ assert(m_image_ctx.image_watcher != NULL);
assert(!m_image_ctx.image_watcher->is_lock_supported() ||
m_image_ctx.image_watcher->is_lock_owner());
assert(m_image_ctx.snap_lock.is_locked());
assert((m_image_ctx.features & RBD_FEATURE_OBJECT_MAP) != 0);
assert(m_image_ctx.owner_lock.is_locked());
+ assert(m_image_ctx.image_watcher != NULL);
assert(!m_image_ctx.image_watcher->is_lock_supported(m_image_ctx.snap_lock) ||
m_image_ctx.image_watcher->is_lock_owner());
assert(m_image_ctx.object_map_lock.is_wlocked());
}
// do not update on-disk flags if not image owner
- if (m_image_ctx.image_watcher->is_lock_supported(m_image_ctx.snap_lock) &&
- !m_image_ctx.image_watcher->is_lock_owner()) {
+ if (m_image_ctx.image_watcher == NULL ||
+ (m_image_ctx.image_watcher->is_lock_supported(m_image_ctx.snap_lock) &&
+ !m_image_ctx.image_watcher->is_lock_owner())) {
return;
}