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 <jerome.duval@gmail.com>
This commit is contained in:
Murai Takashi 2020-01-26 20:23:16 +09:00 committed by Jérôme Duval
parent 958d3f4375
commit f67a677986

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);