diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Muon/ALCBaselineModellingModel.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Muon/ALCBaselineModellingModel.cpp index 82684387ebef981c73be16c5c231d22d8724ce9a..7fd099cbf5d3ad2002d903b3ba86d63bde9ad301 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Muon/ALCBaselineModellingModel.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Muon/ALCBaselineModellingModel.cpp @@ -96,7 +96,7 @@ namespace CustomInterfaces MatrixWorkspace_sptr ALCBaselineModellingModel::exportWorkspace() { - if ( m_data->getNumberHistograms() == 3 ) { + if ( m_data && m_data->getNumberHistograms() == 3 ) { // Export results only if data have been fit, that is, // if m_data has three histograms diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Muon/ALCPeakFittingModel.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Muon/ALCPeakFittingModel.cpp index ae5cca0ba5740491440ad54f948ba4e77c5a9c15..9992b2449240dec3030e6b27a46e97b3140ce8c2 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Muon/ALCPeakFittingModel.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Muon/ALCPeakFittingModel.cpp @@ -19,7 +19,7 @@ namespace CustomInterfaces MatrixWorkspace_sptr ALCPeakFittingModel::exportWorkspace() { - if ( m_data->getNumberHistograms() == 3 ) { + if ( m_data && m_data->getNumberHistograms() == 3 ) { return boost::const_pointer_cast<MatrixWorkspace>(m_data);