# HG changeset patch # User Matti Hamalainen # Date 1366565628 -10800 # Node ID 897646df1de1b4b4f7b649a5f7e83e29451d10e3 # Parent ea42faa02a9a669295351c1d5b45b8ea4697190a Handle preloading of resources that do not have rops. diff -r ea42faa02a9a -r 897646df1de1 dmres.c --- a/dmres.c Sun Apr 21 20:16:16 2013 +0300 +++ b/dmres.c Sun Apr 21 20:33:48 2013 +0300 @@ -613,7 +613,8 @@ int ret = DMERR_OK; // Check if we want to preload raw data? - if (handle->lib->flags & DRF_PRELOAD_RAW) + if ((handle->lib->flags & DRF_PRELOAD_RAW) || + handle->rops == NULL || handle->rops->load == NULL) { if (handle->flags & DMF_LOADED_RAW) ret = DMERR_OK; @@ -699,6 +700,7 @@ *phandle = handle = NULL; } + dmfreset(handle); return res; }