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
|
void
|
||||||
TBarView::PlaceDeskbarMenu()
|
TBarView::PlaceDeskbarMenu()
|
||||||
{
|
{
|
||||||
|
// top or bottom, full
|
||||||
if (!fVertical && fBarMenuBar != NULL) {
|
if (!fVertical && fBarMenuBar != NULL) {
|
||||||
fBarMenuBar->RemoveSelf();
|
fBarMenuBar->RemoveSelf();
|
||||||
delete fBarMenuBar;
|
delete fBarMenuBar;
|
||||||
|
@ -125,8 +125,12 @@ UpScrollArrow::MouseDown(BPoint where)
|
|||||||
if (!IsEnabled())
|
if (!IsEnabled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
dynamic_cast<TScrollArrowView*>(Parent())->ScrollBy(-kDefaultScrollStep);
|
TScrollArrowView* parent = dynamic_cast<TScrollArrowView*>(Parent());
|
||||||
snooze(5000);
|
|
||||||
|
if (parent != NULL) {
|
||||||
|
parent->ScrollBy(-kDefaultScrollStep);
|
||||||
|
snooze(5000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -177,8 +181,10 @@ DownScrollArrow::MouseDown(BPoint where)
|
|||||||
TScrollArrowView* grandparent
|
TScrollArrowView* grandparent
|
||||||
= dynamic_cast<TScrollArrowView*>(Parent()->Parent());
|
= dynamic_cast<TScrollArrowView*>(Parent()->Parent());
|
||||||
|
|
||||||
grandparent->ScrollBy(kDefaultScrollStep);
|
if (grandparent != NULL) {
|
||||||
snooze(5000);
|
grandparent->ScrollBy(kDefaultScrollStep);
|
||||||
|
snooze(5000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user