GH-1556 do not crash when instance has no update task while creating an instance
This commit is contained in:
1 parent
0890a81695
commit
72c92893a5
2 files changed
+11
-1
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user