From: emv Date: Wed, 25 Sep 2019 14:24:42 +0000 (+0300) Subject: 0030994: Test cases of group sat/read_parallel_1/_2 are crashed with exception X-Git-Tag: V7_4_0~5 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=92686513a2fdf6c78fef495788b1990a7046c5cc;p=occt.git 0030994: Test cases of group sat/read_parallel_1/_2 are crashed with exception Revert changes by #30518 --- diff --git a/src/NCollection/NCollection_BaseMap.cxx b/src/NCollection/NCollection_BaseMap.cxx index dcaa1e72e3..c18c219fcb 100644 --- a/src/NCollection/NCollection_BaseMap.cxx +++ b/src/NCollection/NCollection_BaseMap.cxx @@ -17,7 +17,6 @@ #include #include -#include //======================================================================= //function : BeginResize @@ -32,8 +31,13 @@ Standard_Boolean NCollection_BaseMap::BeginResize { // get next size for the buckets array N = NextPrimeForMap(NbBuckets); - Standard_ASSERT (N > NbBuckets, "NextPrimeForMap failed to return valid number", return Standard_False); - + if (N <= myNbBuckets) + { + if (!myData1) + N = myNbBuckets; + else + return Standard_False; + } data1 = (NCollection_ListNode **) myAllocator->Allocate((N+1)*sizeof(NCollection_ListNode *)); memset(data1, 0, (N+1)*sizeof(NCollection_ListNode *));