taskmanager: ensure task is finished before deleting it
Fixes race condition that could result in a segfault if a Task hadn't emitted Finished() before it was destroyed by TaskManager.
This commit is contained in:
@@ -142,8 +142,6 @@ private:
|
||||
*/
|
||||
void DeleteTask(Task* t);
|
||||
|
||||
void TaskFinished(Task *task);
|
||||
|
||||
TaskStatus GetTaskStatus(Task* t);
|
||||
|
||||
void SetTaskStatus(Task* t, TaskStatus status);
|
||||
@@ -173,6 +171,8 @@ private slots:
|
||||
|
||||
void TaskFailed();
|
||||
|
||||
void TaskFinished();
|
||||
|
||||
};
|
||||
|
||||
#endif // TASKMANAGER_H
|
||||
|
||||
Reference in New Issue
Block a user