resolved memory leak which occured everytime the user switched pages or opened a new image
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4013 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
fc54fa7117
commit
374c8f77d5
@ -444,13 +444,14 @@ ImageView::SetImage(BMessage *pmsg)
|
||||
B_TRANSLATOR_BITMAP);
|
||||
BBitmap *pbitmap = NULL;
|
||||
chk = outstream.DetachBitmap(&pbitmap);
|
||||
delete fpbitmap;
|
||||
fpbitmap = pbitmap;
|
||||
pbitmap = NULL;
|
||||
fcurrentRef = ref;
|
||||
// need to keep the ref around if user was to switch pages
|
||||
// need to keep the ref around if user wants to switch pages
|
||||
int32 documentCount = 0;
|
||||
if (ioExtension.FindInt32("/documentCount", &documentCount) ==
|
||||
B_OK && documentCount > 0)
|
||||
if (ioExtension.FindInt32("/documentCount", &documentCount) == B_OK &&
|
||||
documentCount > 0)
|
||||
fdocumentCount = documentCount;
|
||||
else
|
||||
fdocumentCount = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user