Scicos: fix crash on invalid extract 93/21593/2
Clément DAVID [Tue, 6 Oct 2020 09:22:14 +0000 (11:22 +0200)]
Change-Id: Ibec2afc3426fc4c555d765a9eaaf993064932147

scilab/modules/data_structures/sci_gateway/cpp/sci_getfield.cpp

index 7a03719..716fe53 100644 (file)
@@ -262,7 +262,7 @@ static types::Function::ReturnValue sci_getfieldUserType(types::typed_list &in,
         // Extract the properties
         types::typed_list one (1, new types::Double(1));
         types::InternalType* properties = pUT->extract(&one);
-        if (!properties->isString())
+        if (!properties || !properties->isString())
         {
             Scierror(999, _("%s: Could not read the argument #%d properties.\n"), "getfield", 2);
             one[0]->killMe();