Clock: fix crash when resources could not be loaded

This commit is contained in:
Ingo Weinhold 2013-06-30 13:51:49 +02:00
parent 2a24174d9b
commit 4c851c295d
1 changed files with 7 additions and 5 deletions

View File

@ -30,16 +30,18 @@ TOffscreenView::TOffscreenView(BRect frame, const char *name, short mRadius,
fHoursRadius(hRadius),
fMinutesRadius(mRadius),
fFace(face),
fShowSeconds(show)
fShowSeconds(show),
fInner(NULL),
fCenter(NULL)
{
for (short i = 0; i <= 8; i++)
fClockFace[i] = NULL;
status_t error;
BResources rsrcs;
error = rsrcs.SetToImage(&&dummy_label);
dummy_label:
if (error == B_OK) {
for (short i = 0; i <= 8; i++)
fClockFace[i] = NULL;
size_t len;
void *picH;
BRect theRect(0, 0, 82, 82);
@ -114,7 +116,7 @@ TOffscreenView::DrawX()
ASSERT(Window());
if (Window()->Lock()) {
if (fClockFace != NULL)
if (fClockFace[fFace] != NULL)
DrawBitmap(fClockFace[fFace], BPoint(0, 0));
//