Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenlib/intern/dynlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/dynlib.c b/source/blender/blenlib/intern/dynlib.c
index c4692995f20..e7fa3332f43 100644
--- a/source/blender/blenlib/intern/dynlib.c
+++ b/source/blender/blenlib/intern/dynlib.c
@@ -77,12 +77,12 @@ char *PIL_dynlib_get_error_as_string(PILdynlib* lib) {
int err;
/* if lib is NULL reset the last error code */
+ err= GetLastError();
if (!lib) {
SetLastError(ERROR_SUCCESS);
- return NULL;
+ err = ERROR_SUCCESS;
}
- err= GetLastError();
if (err) {
static char buf[1024];
@@ -96,7 +96,7 @@ char *PIL_dynlib_get_error_as_string(PILdynlib* lib) {
return buf;
}
- return NULL;
+ return "unrecognized error";
}
void PIL_dynlib_close(PILdynlib *lib) {