Scicos: fix some issues detected by clang-analyzer
[scilab.git] / scilab / modules / scicos / src / cpp / XMIResource_save.cpp
index ebd1058..ec58021 100644 (file)
@@ -975,6 +975,10 @@ int XMIResource::writePort(xmlTextWriterPtr writer, enum object_properties_t con
     std::vector<int> intArrayValue;
     controller.getObjectProperty(id, PORT, DATATYPE, intArrayValue);
     status = writeDatatype(writer, intArrayValue);
+    if (status == -1)
+    {
+        return status;
+    }
 
     status = xmlTextWriterEndElement(writer);
     if (status == -1)