diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index 26cd30d2c9..48da259d5f 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -453,7 +453,7 @@ BWindow::RemoveChild(BView *child) int32 BWindow::CountChildren() const { - BAutolock locker(this); + BAutolock _(const_cast(this)); return fTopView->CountChildren(); } @@ -461,7 +461,7 @@ BWindow::CountChildren() const BView * BWindow::ChildAt(int32 index) const { - BAutolock locker(this); + BAutolock _(const_cast(this)); return fTopView->ChildAt(index); }