prc: clear error flag if loading deploy-ng blobinfo fails

This commit is contained in:
rdb 2019-01-19 23:12:46 +01:00
parent 6eca44464e
commit ba4036e290

View File

@ -129,7 +129,12 @@ reload_implicit_pages() {
#else
const BlobInfo *blobinfo = (const BlobInfo *)dlsym(dlopen(NULL, RTLD_NOW), "blobinfo");
#endif
if (blobinfo != nullptr && (blobinfo->version == 0 || blobinfo->num_pointers < 10)) {
if (blobinfo == nullptr) {
#ifndef _MSC_VER
// Clear the error flag.
dlerror();
#endif
} else if (blobinfo->version == 0 || blobinfo->num_pointers < 10) {
blobinfo = nullptr;
}