Replace a deleted comment, check parent is not NULL before using it.
This commit is contained in:
parent
9c5644aa09
commit
e06f13f911
@ -349,6 +349,7 @@ TBarView::MouseDown(BPoint where)
|
||||
void
|
||||
TBarView::PlaceDeskbarMenu()
|
||||
{
|
||||
// top or bottom, full
|
||||
if (!fVertical && fBarMenuBar != NULL) {
|
||||
fBarMenuBar->RemoveSelf();
|
||||
delete fBarMenuBar;
|
||||
|
@ -125,8 +125,12 @@ UpScrollArrow::MouseDown(BPoint where)
|
||||
if (!IsEnabled())
|
||||
return;
|
||||
|
||||
dynamic_cast<TScrollArrowView*>(Parent())->ScrollBy(-kDefaultScrollStep);
|
||||
snooze(5000);
|
||||
TScrollArrowView* parent = dynamic_cast<TScrollArrowView*>(Parent());
|
||||
|
||||
if (parent != NULL) {
|
||||
parent->ScrollBy(-kDefaultScrollStep);
|
||||
snooze(5000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -177,8 +181,10 @@ DownScrollArrow::MouseDown(BPoint where)
|
||||
TScrollArrowView* grandparent
|
||||
= dynamic_cast<TScrollArrowView*>(Parent()->Parent());
|
||||
|
||||
grandparent->ScrollBy(kDefaultScrollStep);
|
||||
snooze(5000);
|
||||
if (grandparent != NULL) {
|
||||
grandparent->ScrollBy(kDefaultScrollStep);
|
||||
snooze(5000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user