summaryrefslogtreecommitdiffstats
path: root/api/logic
diff options
context:
space:
mode:
Diffstat (limited to 'api/logic')
-rw-r--r--api/logic/minecraft/WorldList.cpp8
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)
{