tries to handle the case when no view is returned for the web (see bug #1223)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21197 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
690f1e786e
commit
03f068a191
@ -573,14 +573,15 @@ MediaWindow::MessageReceived (BMessage *message)
|
||||
roster->GetNodeFor(node_id, fCurrentNode);
|
||||
|
||||
|
||||
if(roster->GetParameterWebFor(*fCurrentNode, &fParamWeb)==B_OK) {
|
||||
BMediaTheme* theme = BMediaTheme::PreferredTheme();
|
||||
paramView = theme->ViewFor(fParamWeb);
|
||||
if (roster->GetParameterWebFor(*fCurrentNode, &fParamWeb)==B_OK
|
||||
&& (paramView = BMediaTheme::PreferredTheme()->ViewFor(fParamWeb)) != NULL) {
|
||||
fContentView->AddChild(paramView);
|
||||
paramView->ResizeTo(fContentView->Bounds().Width(), fContentView->Bounds().Height() - 10);
|
||||
|
||||
roster->StartWatching(this, *fCurrentNode, B_MEDIA_WILDCARD);
|
||||
} else {
|
||||
if (fParamWeb)
|
||||
delete fParamWeb;
|
||||
fParamWeb = NULL;
|
||||
BRect bounds = fContentView->Bounds();
|
||||
BStringView* stringView = new BStringView(bounds,
|
||||
|
Loading…
Reference in New Issue
Block a user