summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/wgl/stw_getprocaddress.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/wgl/stw_getprocaddress.c')
-rw-r--r--src/gallium/state_trackers/wgl/stw_getprocaddress.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_getprocaddress.c b/src/gallium/state_trackers/wgl/stw_getprocaddress.c
index 8875dc22f3d..d43a55fa9e6 100644
--- a/src/gallium/state_trackers/wgl/stw_getprocaddress.c
+++ b/src/gallium/state_trackers/wgl/stw_getprocaddress.c
@@ -34,6 +34,8 @@
#include "glapi/glapi.h"
#include "stw_ext_gallium.h"
+#include "stw_device.h"
+#include "stw_icd.h"
struct stw_extension_entry
{
@@ -73,6 +75,9 @@ DrvGetProcAddress(
{
const struct stw_extension_entry *entry;
+ if (!stw_dev)
+ return NULL;
+
if (lpszProc[0] == 'w' && lpszProc[1] == 'g' && lpszProc[2] == 'l')
for (entry = stw_extension_entries; entry->name; entry++)
if (strcmp( lpszProc, entry->name ) == 0)