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:
committed by
Jérôme Duval
parent
958d3f4375
commit
f67a677986
@@ -64,13 +64,14 @@ TrackSlider::AttachedToWindow()
|
|||||||
void
|
void
|
||||||
TrackSlider::_InitBitmap()
|
TrackSlider::_InitBitmap()
|
||||||
{
|
{
|
||||||
if (fBitmapView) {
|
if (fBitmap != NULL) {
|
||||||
fBitmap->RemoveChild(fBitmapView);
|
if (fBitmapView != NULL) {
|
||||||
delete fBitmapView;
|
fBitmap->RemoveChild(fBitmapView);
|
||||||
}
|
delete fBitmapView;
|
||||||
if (fBitmap)
|
}
|
||||||
delete fBitmap;
|
delete fBitmap;
|
||||||
|
}
|
||||||
|
|
||||||
BRect rect = Bounds();
|
BRect rect = Bounds();
|
||||||
|
|
||||||
fBitmap = new BBitmap(rect, BScreen().ColorSpace(), true);
|
fBitmap = new BBitmap(rect, BScreen().ColorSpace(), true);
|
||||||
|
|||||||
Reference in New Issue
Block a user