summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
index c2b78c636a7..382e116fd06 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
@@ -95,8 +95,11 @@ pipe_loader_sw_create_screen(struct pipe_loader_device *dev,
return NULL;
init = (void *)util_dl_get_proc_address(sdev->lib, "swrast_create_screen");
- if (!init)
+ if (!init){
+ util_dl_close(sdev->lib);
+ sdev->lib = NULL;
return NULL;
+ }
return init(sdev->ws);
}