]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliSimulation.cxx
Check the status of the command pipe, it might be 0x0 if the process cannot allocate...
[u/mrichter/AliRoot.git] / STEER / AliSimulation.cxx
index 197e09062c472f68f4b44a5e46bca8dbfc33877a..79a19372f23cb7d4f8a63277f58d5756741b8561 100644 (file)
@@ -1261,6 +1261,11 @@ Bool_t AliSimulation::ConvertRawFilesToDate(const char* dateFileName,
          dateFileName, runLoader->GetNumberOfEvents(),runLoader->GetHeader()->GetRun());
   FILE* pipe = gSystem->OpenPipe(command, "w");
 
+  if (!pipe) {
+    AliError(Form("Cannot execute command: %s",command));
+    return kFALSE;
+  }
+
   Int_t selEvents = 0;
   for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) {