From 07706d89d711d1b45dc67a91941901c2f2d4bcc4 Mon Sep 17 00:00:00 2001 From: Harry Jeffery <henry.jeffery@stfc.ac.uk> Date: Tue, 31 Mar 2015 09:13:34 +0100 Subject: [PATCH] Refs #11355 Fix segfault when passing invalid projection --- Code/Mantid/Framework/MDAlgorithms/src/CutMD.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Code/Mantid/Framework/MDAlgorithms/src/CutMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/CutMD.cpp index f1eed1174fe..8954f003c7f 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/CutMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/CutMD.cpp @@ -282,7 +282,6 @@ void CutMD::exec() { const IMDEventWorkspace_sptr inWS = getProperty("InputWorkspace"); const size_t numDims = inWS->getNumDims(); const ITableWorkspace_sptr projection = getProperty("Projection"); - const bool haveProjection = !(*getProperty("Projection")).isDefault(); std::vector<std::vector<double>> pbins(5); pbins[0] = getProperty("P1Bin"); pbins[1] = getProperty("P2Bin"); @@ -292,7 +291,7 @@ void CutMD::exec() { const bool noPix = getProperty("NoPix"); // Check Projection format - if (haveProjection) { + if (projection) { auto colNames = projection->getColumnNames(); if (colNames.size() != 4 || std::find(colNames.begin(), colNames.end(), "name") == colNames.end() || -- GitLab