summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/state_trackers/clover/core/platform.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/core/platform.cpp b/src/gallium/state_trackers/clover/core/platform.cpp
index 328b71cdcb1..489e8dc5a83 100644
--- a/src/gallium/state_trackers/clover/core/platform.cpp
+++ b/src/gallium/state_trackers/clover/core/platform.cpp
@@ -32,7 +32,8 @@ platform::platform() : adaptor_range(evals(), devs) {
for (pipe_loader_device *ldev : ldevs) {
try {
- devs.push_back(create<device>(*this, ldev));
+ if (ldev)
+ devs.push_back(create<device>(*this, ldev));
} catch (error &) {
pipe_loader_release(&ldev, 1);
}