mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 01:58:36 +05:00
PAL9165. prevent exception at access to non-initialized out parameters
This commit is contained in:
parent
22d4093cbc
commit
95203e4b8e
@ -136,10 +136,13 @@ void GEOM_IInsertOperations_i::ImportTranslators
|
|||||||
// Get sequences of available formats
|
// Get sequences of available formats
|
||||||
Handle(TColStd_HSequenceOfAsciiString) aFormats = new TColStd_HSequenceOfAsciiString;
|
Handle(TColStd_HSequenceOfAsciiString) aFormats = new TColStd_HSequenceOfAsciiString;
|
||||||
Handle(TColStd_HSequenceOfAsciiString) aPatterns = new TColStd_HSequenceOfAsciiString;
|
Handle(TColStd_HSequenceOfAsciiString) aPatterns = new TColStd_HSequenceOfAsciiString;
|
||||||
if (!GetOperations()->ImportTranslators(aFormats, aPatterns)) return;
|
if (!GetOperations()->ImportTranslators(aFormats, aPatterns) ||
|
||||||
|
aFormats->Length() != aPatterns->Length())
|
||||||
|
{
|
||||||
|
aFormats->Clear(); aPatterns->Clear();
|
||||||
|
}
|
||||||
|
|
||||||
const int formSize = aFormats->Length(), pattSize = aPatterns->Length();
|
const int formSize = aFormats->Length(), pattSize = aPatterns->Length();
|
||||||
if (formSize != pattSize) return;
|
|
||||||
|
|
||||||
// allocate the CORBA arrays
|
// allocate the CORBA arrays
|
||||||
GEOM::string_array_var aFormatsArray = new GEOM::string_array();
|
GEOM::string_array_var aFormatsArray = new GEOM::string_array();
|
||||||
|
Loading…
Reference in New Issue
Block a user