diff options
Diffstat (limited to 'application/dialogs/ProgressDialog.cpp')
-rw-r--r-- | application/dialogs/ProgressDialog.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/application/dialogs/ProgressDialog.cpp b/application/dialogs/ProgressDialog.cpp index bca4e168..17ab79cd 100644 --- a/application/dialogs/ProgressDialog.cpp +++ b/application/dialogs/ProgressDialog.cpp @@ -17,6 +17,7 @@ #include "ui_ProgressDialog.h" #include <QKeyEvent> +#include <QDebug> #include "tasks/Task.h" @@ -57,6 +58,12 @@ int ProgressDialog::execWithTask(Task *task) this->task = task; QDialog::DialogCode result; + if(!task) + { + qDebug() << "Programmer error: progress dialog created with null task."; + return Accepted; + } + if(handleImmediateResult(result)) { return result; |