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:
Diffstat (limited to 'source/blender/blenlib/intern/dynlib.c')
-rw-r--r--source/blender/blenlib/intern/dynlib.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/dynlib.c b/source/blender/blenlib/intern/dynlib.c
index b172ae7a518..31f8d9d3d57 100644
--- a/source/blender/blenlib/intern/dynlib.c
+++ b/source/blender/blenlib/intern/dynlib.c
@@ -51,8 +51,9 @@ DynamicLibrary *BLI_dynlib_open(const char *name)
handle = LoadLibraryW(name_16);
UTF16_UN_ENCODE(name);
- if (!handle)
+ if (!handle) {
return NULL;
+ }
lib = MEM_callocN(sizeof(*lib), "Dynamic Library");
lib->handle = handle;
@@ -71,8 +72,9 @@ char *BLI_dynlib_get_error_as_string(DynamicLibrary *lib)
/* if lib is NULL reset the last error code */
err = GetLastError();
- if (!lib)
+ if (!lib) {
SetLastError(ERROR_SUCCESS);
+ }
if (err) {
static char buf[1024];
@@ -103,8 +105,9 @@ DynamicLibrary *BLI_dynlib_open(const char *name)
DynamicLibrary *lib;
void *handle = dlopen(name, RTLD_LAZY);
- if (!handle)
+ if (!handle) {
return NULL;
+ }
lib = MEM_callocN(sizeof(*lib), "Dynamic Library");
lib->handle = handle;