mmdevapi: Don't try to lookup functions if the library isn't found.

This commit is contained in:
Alexandre Julliard 2010-05-04 21:30:07 +02:00
parent ac69fcb14f
commit 41db8e5910
1 changed files with 4 additions and 0 deletions

View File

@ -174,7 +174,11 @@ static void load_libopenal(void)
char error[128]; char error[128];
openal_handle = wine_dlopen(SONAME_LIBOPENAL, RTLD_NOW, error, sizeof(error)); openal_handle = wine_dlopen(SONAME_LIBOPENAL, RTLD_NOW, error, sizeof(error));
if (!openal_handle) if (!openal_handle)
{
ERR("Couldn't load " SONAME_LIBOPENAL ": %s\n", error); ERR("Couldn't load " SONAME_LIBOPENAL ": %s\n", error);
return;
}
#define LOAD_FUNCPTR(f) \ #define LOAD_FUNCPTR(f) \
if((p##f = wine_dlsym(openal_handle, #f, NULL, 0)) == NULL) { \ if((p##f = wine_dlsym(openal_handle, #f, NULL, 0)) == NULL) { \
ERR("Couldn't lookup %s in libopenal\n", #f); \ ERR("Couldn't lookup %s in libopenal\n", #f); \