diff options
| author | Petr Mrázek <peterix@gmail.com> | 2016-08-07 00:44:30 +0200 |
|---|---|---|
| committer | Petr Mrázek <peterix@gmail.com> | 2016-08-07 11:44:42 +0200 |
| commit | c44d41ee9b132d4f757658bd62d4b115b7887fe3 (patch) | |
| tree | c0561e813b62ee85ba70066ac2682bc90819968d | |
| parent | cf0694a0cb9041c14cc0e06b9495590baacead73 (diff) | |
| download | PrismLauncher-c44d41ee9b132d4f757658bd62d4b115b7887fe3.tar.gz PrismLauncher-c44d41ee9b132d4f757658bd62d4b115b7887fe3.tar.bz2 PrismLauncher-c44d41ee9b132d4f757658bd62d4b115b7887fe3.zip | |
NOISSUE do not attempt to stop watching world folders if they are not being watched
| -rw-r--r-- | api/logic/minecraft/WorldList.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/api/logic/minecraft/WorldList.cpp b/api/logic/minecraft/WorldList.cpp index 42c8a3e6..df897e7c 100644 --- a/api/logic/minecraft/WorldList.cpp +++ b/api/logic/minecraft/WorldList.cpp @@ -37,6 +37,10 @@ WorldList::WorldList(const QString &dir) void WorldList::startWatching() { + if(is_watching) + { + return; + } update(); is_watching = m_watcher->addPath(m_dir.absolutePath()); if (is_watching) @@ -51,6 +55,10 @@ void WorldList::startWatching() void WorldList::stopWatching() { + if(!is_watching) + { + return; + } is_watching = !m_watcher->removePath(m_dir.absolutePath()); if (!is_watching) { |
