soundrecorder: Fix PVS V595

Add NULL check for 'fBitmap', since it might be NULL
at line 71.

Change-Id: I70bf4d29e20bbe1c62d972f576dc52d4783933d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2169
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
Murai Takashi
2020-01-31 11:46:42 +00:00
committed by Jérôme Duval
parent 958d3f4375
commit f67a677986
+7 -6
View File
@@ -64,13 +64,14 @@ TrackSlider::AttachedToWindow()
void
TrackSlider::_InitBitmap()
{
if (fBitmapView) {
fBitmap->RemoveChild(fBitmapView);
delete fBitmapView;
}
if (fBitmap)
if (fBitmap != NULL) {
if (fBitmapView != NULL) {
fBitmap->RemoveChild(fBitmapView);
delete fBitmapView;
}
delete fBitmap;
}
BRect rect = Bounds();
fBitmap = new BBitmap(rect, BScreen().ColorSpace(), true);