player: return as soon as possible. 38/184238/2
authorHermet Park <hermetpark@gmail.com>
Mon, 16 Jul 2018 12:47:57 +0000 (21:47 +0900)
committerSubhransu Mohanty <sub.mohanty@samsung.com>
Tue, 17 Jul 2018 09:58:36 +0000 (09:58 +0000)
We need to take account of user side, not internal ones.

Change-Id: Ic7bccc343c771870d10b25fc7dec01217a1d4e35

src/lottie/lottieloader.cpp
src/lottie/lottieplayer.cpp

index 3d42195..b6323de 100644 (file)
@@ -52,8 +52,6 @@ LottieLoader::LottieLoader()
 
 bool LottieLoader::load(std::string &path)
 {
-   if (path.empty()) return false;
-
    LottieFileCache &fileCache = LottieFileCache::get();
 
    mModel = fileCache.find(path);
index b68e0f4..bda3213 100644 (file)
@@ -94,6 +94,11 @@ LOTPlayerPrivate::LOTPlayerPrivate()
 bool
 LOTPlayerPrivate::setFilePath(std::string path)
 {
+   if (path.empty()) {
+      vWarning << "File path is empty";
+      return false;
+   }
+
    LottieLoader loader;
    if (loader.load(path)) {
       mModel = loader.model();