summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2006-02-09 16:13:30 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2006-02-09 16:13:30 +0000
commit905d3201c516a5308dbcf1010bb641d6bda5b981 (patch)
treeba05d29d69f02b9ea9980ea7b9751ac28d80600e
parented93c202b76a74b244438b2f11557342f4b008a4 (diff)
INTEGRATION: CWS c03vcl (1.126.22); FILE MERGED
2006/02/08 15:13:42 hdu 1.126.22.1: #125142# be more defensive in winsalframe destructor
-rw-r--r--vcl/win/source/window/salframe.cxx24
1 files changed, 11 insertions, 13 deletions
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 3607ed6393c9..9d3818e1ee9a 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: salframe.cxx,v $
*
- * $Revision: 1.126 $
+ * $Revision: 1.127 $
*
- * last change: $Author: hr $ $Date: 2006-01-26 18:11:48 $
+ * last change: $Author: rt $ $Date: 2006-02-09 17:13:30 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -990,6 +990,13 @@ WinSalFrame::~WinSalFrame()
{
SalData* pSalData = GetSalData();
+ // remove frame from framelist
+ WinSalFrame** ppFrame = &pSalData->mpFirstFrame;
+ for(; (*ppFrame != this) && *ppFrame; ppFrame = &(*ppFrame)->mpNextFrame );
+ if( *ppFrame )
+ *ppFrame = mpNextFrame;
+ mpNextFrame = NULL;
+
// Release Cache DC
if ( mpGraphics2 &&
mpGraphics2->mhDC )
@@ -1003,6 +1010,7 @@ WinSalFrame::~WinSalFrame()
ImplSalDeInitGraphics( mpGraphics );
ReleaseDC( mhWnd, mpGraphics->mhDC );
delete mpGraphics;
+ mpGraphics = NULL;
}
if ( mhWnd )
@@ -1021,18 +1029,8 @@ WinSalFrame::~WinSalFrame()
// destroy system frame
if ( !DestroyWindow( mhWnd ) )
SetWindowPtr( mhWnd, 0 );
- }
-
- // remove frame from framelist
- if ( this == pSalData->mpFirstFrame )
- pSalData->mpFirstFrame = mpNextFrame;
- else
- {
- WinSalFrame* pTempFrame = pSalData->mpFirstFrame;
- while ( pTempFrame->mpNextFrame != this )
- pTempFrame = pTempFrame->mpNextFrame;
- pTempFrame->mpNextFrame = mpNextFrame;
+ mhWnd = 0;
}
}