[vlmc-devel] Close files correctly

Yikai Lu git at videolan.org
Sat Apr 9 22:18:06 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Sat Apr  9 11:44:05 2016 +0900| [3ff2663ccdc4fe84709fbb9cf4d6930028347748] | committer: Hugo Beauzée-Luyssen

Close files correctly

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> https://code.videolan.org/videolan/vlmc/commit/3ff2663ccdc4fe84709fbb9cf4d6930028347748
---

 src/Settings/Settings.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Settings/Settings.cpp b/src/Settings/Settings.cpp
index 6a07006..7717bee 100644
--- a/src/Settings/Settings.cpp
+++ b/src/Settings/Settings.cpp
@@ -89,6 +89,7 @@ Settings::readSettingsFromFile()
         vlmcWarning() << error.errorString();
         return QJsonDocument( QJsonObject() );
     }
+    m_settingsFile->close();
     return doc;
 }
 
@@ -107,7 +108,6 @@ Settings::load()
         child.second->loadJsonFrom( top[ child.first ].toObject() );
     }
 
-    m_settingsFile->close();
     return true;
 }
 



More information about the Vlmc-devel mailing list