From 2f41383c3bf2993545ffc687afbc82196a95f5e0 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Mon, 24 Aug 2015 10:21:31 +0200 Subject: [PATCH] BBitmap: Archive the data also if "deep" is not set Fixes #12326 --- src/kits/interface/Bitmap.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/kits/interface/Bitmap.cpp b/src/kits/interface/Bitmap.cpp index 33f60ca16b..42da316733 100644 --- a/src/kits/interface/Bitmap.cpp +++ b/src/kits/interface/Bitmap.cpp @@ -429,16 +429,15 @@ BBitmap::Archive(BMessage* data, bool deep) const break; } } - // Note: R5 does not archive the data if B_BITMAP_IS_CONTIGUOUS is - // true and it does save all formats as B_RAW_TYPE and it does save - // the data even if B_BITMAP_ACCEPTS_VIEWS is set (as opposed to - // the BeBook) - if (ret == B_OK) { - const_cast(this)->_AssertPointer(); - ret = data->AddData("_data", B_RAW_TYPE, fBasePointer, fSize); - } } - + // Note: R5 does not archive the data if B_BITMAP_IS_CONTIGUOUS is + // true and it does save all formats as B_RAW_TYPE and it does save + // the data even if B_BITMAP_ACCEPTS_VIEWS is set (as opposed to + // the BeBook) + if (ret == B_OK) { + const_cast(this)->_AssertPointer(); + ret = data->AddData("_data", B_RAW_TYPE, fBasePointer, fSize); + } return ret; }