Media: Don't delete the BLayoutItem when clearing the parameter view.

It is owned by the BView which we delete on the next line; and doing this
triggers an assert if there are still child views, which the BView destructor
cleans up before deleting the layout item.

Change-Id: I2f6f913b963e15c9808328aa2e0581cd1755e8ce
Reviewed-on: https://review.haiku-os.org/c/888
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Augustin Cavalier 2019-01-21 17:21:35 -05:00 committed by waddlesplash
parent a1f3d79db8
commit 658362336e

View File

@ -678,7 +678,6 @@ MediaWindow::_ClearParamView()
BView* view = item->View();
if (view != fVideoView && view != fAudioView && view != fMidiView) {
fContentLayout->RemoveItem(item);
delete item;
delete view;
delete fParamWeb;
fParamWeb = NULL;