mirror of
https://github.com/CDAGaming/blizzget
synced 2026-01-31 22:52:44 +03:00
fix build errors and inconsistence crash
This commit is contained in:
parent
d6b783d5c1
commit
c85a408144
@ -6,6 +6,7 @@
|
|||||||
#include "wizard.h"
|
#include "wizard.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
void ProgramData::Task::stop() {
|
void ProgramData::Task::stop() {
|
||||||
terminate_ = true;
|
terminate_ = true;
|
||||||
@ -50,11 +51,13 @@ int ProgramData::Task::proc() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ProgramData::setTask(Task* task) {
|
void ProgramData::setTask(Task* task) {
|
||||||
// duplicating the unique_ptr just in case
|
// FIXME: This causes an crash since old pointer is begin released before its swap contents.
|
||||||
{
|
// smart_ptr.reset is enough for now
|
||||||
|
|
||||||
|
/* {
|
||||||
auto tsk = task_;
|
auto tsk = task_;
|
||||||
if (tsk) tsk->stop();
|
if (tsk) tsk->stop();
|
||||||
}
|
}*/
|
||||||
task_.reset(task);
|
task_.reset(task);
|
||||||
if (task) task->start(this);
|
if (task) task->start(this);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user