diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-03-30 12:26:24 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-03-30 20:11:41 +0200 |
commit | e1e1d99102936b419aac52974f1fdb8be835b0d4 (patch) | |
tree | fd59107990566d0e42f82b16610f60be0a28d19f /logic/lists | |
parent | 7cb76788bd5d1aa35ce38122efa4fdba4433d046 (diff) | |
download | MultiMC-e1e1d99102936b419aac52974f1fdb8be835b0d4.tar MultiMC-e1e1d99102936b419aac52974f1fdb8be835b0d4.tar.gz MultiMC-e1e1d99102936b419aac52974f1fdb8be835b0d4.tar.lz MultiMC-e1e1d99102936b419aac52974f1fdb8be835b0d4.tar.xz MultiMC-e1e1d99102936b419aac52974f1fdb8be835b0d4.zip |
Fix java checker crash, some memory leaks
Diffstat (limited to 'logic/lists')
-rw-r--r-- | logic/lists/JavaVersionList.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/logic/lists/JavaVersionList.cpp b/logic/lists/JavaVersionList.cpp index eb1c5650..4fd0bc19 100644 --- a/logic/lists/JavaVersionList.cpp +++ b/logic/lists/JavaVersionList.cpp @@ -160,7 +160,7 @@ void JavaVersionList::sort() // NO-OP for now } -JavaListLoadTask::JavaListLoadTask(JavaVersionList *vlist) +JavaListLoadTask::JavaListLoadTask(JavaVersionList *vlist) : Task() { m_list = vlist; m_currentRecommended = NULL; @@ -207,7 +207,6 @@ void JavaListLoadTask::checkerProgress(int current, int total) void JavaListLoadTask::javaCheckerFinished(QList<JavaCheckResult> results) { QList<JavaVersionPtr> candidates; - m_job.reset(); QLOG_DEBUG() << "Found the following valid Java installations:"; for(JavaCheckResult result : results) @@ -226,14 +225,14 @@ void JavaListLoadTask::javaCheckerFinished(QList<JavaCheckResult> results) } QList<BaseVersionPtr> javas_bvp; - for (auto &java : candidates) + for (auto java : candidates) { //QLOG_INFO() << java->id << java->arch << " at " << java->path; BaseVersionPtr bp_java = std::dynamic_pointer_cast<BaseVersion>(java); if (bp_java) { - javas_bvp.append(bp_java); + javas_bvp.append(java); } } |