1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +03:00

0022749: Segfault in HashCode() of Standard_Transient

This commit is contained in:
DBV
2012-02-17 11:40:25 +00:00
committed by bugmaster
parent 982a90fcba
commit ec6a1aa771
8 changed files with 14 additions and 42 deletions

View File

@@ -387,14 +387,10 @@ void WNT_WDriver :: SetMarkerAttrib (
Standard_Boolean WNT_WDriver :: IsKnownImage (
const Handle( Standard_Transient )& anImage
) {
return myWNTWindow -> myImages -> Index (
anImage -> HashCode(
IntegerLast ()
)
)
{
return myWNTWindow -> myImages -> Index ( ::HashCode (anImage, IntegerLast())
) ? Standard_True : Standard_False;
} // end WNT_WDriver :: IsKnownImage
Standard_Boolean WNT_WDriver :: SizeOfImageFile (
@@ -417,9 +413,7 @@ Standard_Boolean WNT_WDriver :: SizeOfImageFile (
void WNT_WDriver :: ClearImage ( const Handle( Standard_Transient )& anImageId ) {
Standard_Integer i = myWNTWindow -> myImages -> Index (
anImageId -> HashCode (
IntegerLast ()
)
::HashCode (anImageId, IntegerLast())
);
if ( i ) myWNTWindow -> myImages -> Discard ( i );
@@ -441,9 +435,7 @@ void WNT_WDriver :: DrawImage (
) {
Standard_Integer i = myWNTWindow -> myImages -> Index (
anImageId -> HashCode (
IntegerLast ()
)
::HashCode (anImageId, IntegerLast())
);
if ( i ) A -> Image (
@@ -512,7 +504,7 @@ void WNT_WDriver :: FillAndDrawImage (
hpo = SelectPalette ( hdcMem, ( HPALETTE )gDev -> HPalette (), FALSE );
i = myWNTWindow -> myImages -> Index (
h = anImageId -> HashCode ( IntegerLast () )
h = ::HashCode (anImageId, IntegerLast())
);
if ( i == 0 ) i = myWNTWindow -> myImages -> Open ( hdc, Width, Height, h );
@@ -586,7 +578,7 @@ void WNT_WDriver :: FillAndDrawImage (
hpo = SelectPalette ( hdcMem, ( HPALETTE )gDev -> HPalette (), FALSE );
i = myWNTWindow -> myImages -> Index (
h = anImageId -> HashCode ( IntegerLast () )
h = ::HashCode (anImageId, IntegerLast())
);
if ( i == 0 ) i = myWNTWindow -> myImages -> Open ( hdc, Width, Height, h );