st/python: Generate binding for u_format utility functions too.
[mesa.git] / src / gallium / state_trackers / wgl / stw_getprocaddress.c
index 8875dc22f3dc3e6f302225ceeafd5da9a66b5f63..d43a55fa9e603ed45859eab9dc5943a0bb88a05c 100644 (file)
@@ -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)