BWindow::SetDefaultButton() crashed when setting another default button.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13565 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8ddc570d6f
commit
32d7b6cf21
@ -1211,9 +1211,10 @@ BWindow::SetDefaultButton(BButton *button)
|
||||
return;
|
||||
|
||||
if (fDefaultButton != NULL) {
|
||||
// tell old button he's no longer the default one
|
||||
fDefaultButton->MakeDefault(false);
|
||||
fDefaultButton->Invalidate();
|
||||
// tell old button it's no longer the default one
|
||||
BButton *oldDefault = fDefaultButton;
|
||||
oldDefault->MakeDefault(false);
|
||||
oldDefault->Invalidate();
|
||||
}
|
||||
|
||||
fDefaultButton = button;
|
||||
|
Loading…
x
Reference in New Issue
Block a user