Browse Source

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

rdb 7 years ago
parent
commit
ba4036e290
1 changed files with 6 additions and 1 deletions
  1. 6 1
      dtool/src/prc/configPageManager.cxx

+ 6 - 1
dtool/src/prc/configPageManager.cxx

@@ -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;
   }