diff dmres.c @ 733:b505b81a43de

Fix resource loading.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 21 Apr 2013 20:03:08 +0300
parents 2f02d9b4caa3
children 56c1d288f0e2
line wrap: on
line diff
--- a/dmres.c	Sun Apr 21 19:58:59 2013 +0300
+++ b/dmres.c	Sun Apr 21 20:03:08 2013 +0300
@@ -610,7 +610,7 @@
  */
 static int dmResourcePreload(DMResource *handle)
 {
-    int ret = DMERR_INIT_FAIL;
+    int ret = DMERR_OK;
 
     // Check if we want to preload raw data?
     if (handle->lib->flags & DRF_PRELOAD_RAW)
@@ -624,6 +624,8 @@
             if (ret == DMERR_OK)
                 handle->flags |= DMF_LOADED_RAW | DMF_PERSIST;
         }
+        else
+            ret = DMERR_INIT_FAIL;
 
         dmfreset(handle);
     }