diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp
index 26a0c6c29..0093eda05 100644
--- a/src/app/valentina/mainwindow.cpp
+++ b/src/app/valentina/mainwindow.cpp
@@ -3296,6 +3296,12 @@ QString MainWindow::CheckPathToMeasurements(const QString &patternPath, const QS
QFileInfo table(path);
if (table.exists() == false)
{
+ if (!qApp->CheckGUI())
+ {
+ vStdErr() << tr("The measurements file \"") << path << tr("\" could not be found.\n");
+ return QString();
+ }
+
QString text = tr("The measurements file
%1
%3").arg(path)
.arg(tr("could not be found. Do you want to update the file location"));
QMessageBox::StandardButton res = QMessageBox::question(this, "Loading measurements file", text,