Skip to content

Commit 79f8c5d

Browse files
biglizardsZuzu-Typ
authored andcommitted
Ensure library exists before loading it (#10)
1 parent 0a377a3 commit 79f8c5d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

openal/library_loader.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@ def load_other(name, paths = None):
4949
for style in _other_styles:
5050
candidate = style.format(name)
5151
library = ctypes.util.find_library(candidate)
52-
try:
53-
return ctypes.CDLL(library)
54-
except:
55-
pass
52+
if library:
53+
try:
54+
return ctypes.CDLL(library)
55+
except:
56+
pass
5657

5758
@staticmethod
5859
def load_windows(name, paths = None):

0 commit comments

Comments
 (0)