From 8cf55acfffbfa3caea2fbc4d25a6425dbffbeef5 Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Thu, 24 Feb 2011 18:52:07 +0000 Subject: [PATCH] When update the original image, we can't set it directly as its address has changed, and _SetPicture() will then delete it behind our back. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40671 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/people/PictureView.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/apps/people/PictureView.cpp b/src/apps/people/PictureView.cpp index bedc5fe917..39d2773bb9 100644 --- a/src/apps/people/PictureView.cpp +++ b/src/apps/people/PictureView.cpp @@ -127,13 +127,15 @@ PictureView::Revert() void PictureView::Update(const entry_ref* ref) { - // Don't update when user has changed the picture + // Don't update when user has modified the picture if (HasChanged()) return; + BBitmap* bitmap = BTranslationUtils::GetBitmap(ref); + _SetPicture(bitmap); + delete fOriginalPicture; - fOriginalPicture = BTranslationUtils::GetBitmap(ref); - _SetPicture(fOriginalPicture); + fOriginalPicture = fPicture; }