Skip to content

Commit 8943932

Browse files
committed
dynamic.prefer returns false if requested api unavailable
1 parent 4b0be20 commit 8943932

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dynamic.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ pub fn Xev(comptime bes: []const AllBackend) type {
110110
inline for (bes) |candidate| {
111111
if (candidate == be) {
112112
const api = candidate.Api();
113-
if (api.available()) backend = subset(candidate);
113+
if (!api.available()) return false;
114+
backend = subset(candidate);
114115
return true;
115116
}
116117
}

0 commit comments

Comments
 (0)