diff --git a/Framework/CurveFitting/src/Functions/UserFunction.cpp b/Framework/CurveFitting/src/Functions/UserFunction.cpp
index ce6cbbdf2b3d9248be6dc1dbf6ba2516321efe30..a44540a0cdb254fbbe5016b8c0d8daf3fa355710 100644
--- a/Framework/CurveFitting/src/Functions/UserFunction.cpp
+++ b/Framework/CurveFitting/src/Functions/UserFunction.cpp
@@ -112,7 +112,11 @@ void UserFunction::function1D(double *out, const double *xValues,
                               const size_t nData) const {
   for (size_t i = 0; i < nData; i++) {
     m_x = xValues[i];
-    out[i] = m_parser->Eval();
+    try {
+      out[i] = m_parser->Eval();
+    } catch (mu::Parser::exception_type &e) {
+      throw std::invalid_argument("Error evaluating function: " + e.GetMsg());
+    }
   }
 }
 
diff --git a/docs/source/release/v5.0.0/mantidplot.rst b/docs/source/release/v5.0.0/mantidplot.rst
index 4843cb3b87e6cc03d82887ab7d9ef186ea2be47f..8eea849e5303b482318cba617aa61e4cc92fd40c 100644
--- a/docs/source/release/v5.0.0/mantidplot.rst
+++ b/docs/source/release/v5.0.0/mantidplot.rst
@@ -14,6 +14,7 @@ Bugfixes
 - Fixed an issue with Workspace History where unrolling consecutive workflow algorithms would result in only one of the algorithms being unrolled.
 - Fixed an issue where adding specific functions to the multi-dataset fitting interface caused it to crash
 - Fixed an issue where mantid crashed if you cleared the functions in the multi-dataset fitting interface
+- Fixed an issue where adding a UserFunction to the multi-dataset fitting interface caused a crash
 
 
 :ref:`Release 5.0.0 <v5.0.0>`
\ No newline at end of file