Fixed MoveToBack/MoveToFront crasher
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2157 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -351,10 +351,6 @@ void WindowBorder::MoveToBack(void)
|
|||||||
#ifdef DEBUG_WINBORDER
|
#ifdef DEBUG_WINBORDER
|
||||||
printf("WindowBorder(): MoveToBack\n");
|
printf("WindowBorder(): MoveToBack\n");
|
||||||
#endif
|
#endif
|
||||||
Layer *temp=NULL;
|
|
||||||
if(uppersibling)
|
|
||||||
temp=uppersibling;
|
|
||||||
|
|
||||||
// Move the window to the back (the top of the tree)
|
// Move the window to the back (the top of the tree)
|
||||||
Layer *top=GetRootLayer();
|
Layer *top=GetRootLayer();
|
||||||
ASSERT(top!=NULL);
|
ASSERT(top!=NULL);
|
||||||
@@ -366,7 +362,7 @@ printf("WindowBorder(): MoveToBack\n");
|
|||||||
decor->SetFocus(false);
|
decor->SetFocus(false);
|
||||||
decor->Draw();
|
decor->Draw();
|
||||||
|
|
||||||
if(temp)
|
if(uppersibling)
|
||||||
ActivateWindow(uppersibling->serverwin);
|
ActivateWindow(uppersibling->serverwin);
|
||||||
layerlock->Unlock();
|
layerlock->Unlock();
|
||||||
parent->RebuildRegions(true);
|
parent->RebuildRegions(true);
|
||||||
@@ -399,7 +395,8 @@ printf("MoveToFront: \n");
|
|||||||
// Tweak this layer
|
// Tweak this layer
|
||||||
parent=top;
|
parent=top;
|
||||||
uppersibling=templayer;
|
uppersibling=templayer;
|
||||||
uppersibling->lowersibling=this;
|
if(uppersibling)
|
||||||
|
uppersibling->lowersibling=this;
|
||||||
lowersibling=NULL;
|
lowersibling=NULL;
|
||||||
|
|
||||||
layerlock->Unlock();
|
layerlock->Unlock();
|
||||||
|
|||||||
Reference in New Issue
Block a user