fInitialized is also set in the copy constructor. BTW, the Haiku Logo is displayed now (forgot to commit this earlier). Thanks to Axel for finding out about this.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13110 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2005-06-14 00:38:21 +00:00
parent 6262418e6a
commit 75d26e104a

View File

@ -24,6 +24,8 @@
// Description: Bitmap class used by the server
//
//------------------------------------------------------------------------------
#include <new>
#include "ServerBitmap.h"
/*!
@ -66,6 +68,7 @@ ServerBitmap::ServerBitmap(const ServerBitmap* bmp)
// TODO: what about fToken and fOffset ?!?
{
if (bmp) {
fInitialized = bmp->fInitialized;
fWidth = bmp->fWidth;
fHeight = bmp->fHeight;
fBytesPerRow = bmp->fBytesPerRow;
@ -103,14 +106,8 @@ ServerBitmap::_AllocateBuffer(void)
uint32 length = BitsLength();
if (length > 0) {
delete[] fBuffer;
try {
fBuffer = new uint8[length];
fInitialized = true;
} catch (...) {
// we can't do anything about it
fBuffer = NULL;
fInitialized = false;
}
fBuffer = new(nothrow) uint8[length];
fInitialized = fBuffer != NULL;
}
}
@ -124,6 +121,7 @@ ServerBitmap::_FreeBuffer(void)
{
delete[] fBuffer;
fBuffer = NULL;
fInitialized = false;
}
/*!