Skip to content
Snippets Groups Projects
Commit d72bb0e1 authored by Raquel Alvarez Banos's avatar Raquel Alvarez Banos
Browse files

Re #11711 Fix crash when data has not been set

parent 5de8e0d4
No related branches found
No related tags found
No related merge requests found
...@@ -96,7 +96,7 @@ namespace CustomInterfaces ...@@ -96,7 +96,7 @@ namespace CustomInterfaces
MatrixWorkspace_sptr ALCBaselineModellingModel::exportWorkspace() 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, // Export results only if data have been fit, that is,
// if m_data has three histograms // if m_data has three histograms
......
...@@ -19,7 +19,7 @@ namespace CustomInterfaces ...@@ -19,7 +19,7 @@ namespace CustomInterfaces
MatrixWorkspace_sptr ALCPeakFittingModel::exportWorkspace() MatrixWorkspace_sptr ALCPeakFittingModel::exportWorkspace()
{ {
if ( m_data->getNumberHistograms() == 3 ) { if ( m_data && m_data->getNumberHistograms() == 3 ) {
return boost::const_pointer_cast<MatrixWorkspace>(m_data); return boost::const_pointer_cast<MatrixWorkspace>(m_data);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment