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:
DarkWyrm
2002-12-03 22:54:16 +00:00
parent 8c852f3236
commit 325a5f6bb6
+3 -6
View File
@@ -351,10 +351,6 @@ void WindowBorder::MoveToBack(void)
#ifdef DEBUG_WINBORDER
printf("WindowBorder(): MoveToBack\n");
#endif
Layer *temp=NULL;
if(uppersibling)
temp=uppersibling;
// Move the window to the back (the top of the tree)
Layer *top=GetRootLayer();
ASSERT(top!=NULL);
@@ -366,7 +362,7 @@ printf("WindowBorder(): MoveToBack\n");
decor->SetFocus(false);
decor->Draw();
if(temp)
if(uppersibling)
ActivateWindow(uppersibling->serverwin);
layerlock->Unlock();
parent->RebuildRegions(true);
@@ -399,7 +395,8 @@ printf("MoveToFront: \n");
// Tweak this layer
parent=top;
uppersibling=templayer;
uppersibling->lowersibling=this;
if(uppersibling)
uppersibling->lowersibling=this;
lowersibling=NULL;
layerlock->Unlock();