NOISSUE do not attempt to stop watching world folders if they are not being watched

This commit is contained in:
Petr Mrázek 2016-08-07 00:44:30 +02:00
parent cf0694a0cb
commit c44d41ee9b

View File

@ -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)
{