struct stw_context *dst;
BOOL ret = FALSE;
+ if (!stw_dev)
+ return FALSE;
+
pipe_mutex_lock( stw_dev->ctx_mutex );
src = stw_lookup_context_locked( dhrcSource );
struct stw_context *ctx2;
BOOL ret = FALSE;
+ if (!stw_dev)
+ return FALSE;
+
pipe_mutex_lock( stw_dev->ctx_mutex );
ctx1 = stw_lookup_context_locked( dhglrc1 );
if(!tls_data)
return 0;
- if (nCode < 0)
+ if (nCode < 0 || !stw_dev)
return CallNextHookEx(tls_data->hCallWndProcHook, nCode, wParam, lParam);
if (pParams->message == WM_WINDOWPOSCHANGED) {
struct stw_framebuffer *fb;
struct stw_framebuffer *next;
+ if (!stw_dev)
+ return;
+
pipe_mutex_lock( stw_dev->fb_mutex );
fb = stw_dev->fb_head;
{
struct stw_framebuffer *fb;
+ if (!stw_dev)
+ return NULL;
+
pipe_mutex_lock( stw_dev->fb_mutex );
fb = stw_framebuffer_from_hdc_locked(hdc);
pipe_mutex_unlock( stw_dev->fb_mutex );
uint index;
struct stw_framebuffer *fb;
+ if (!stw_dev)
+ return FALSE;
+
index = (uint) iPixelFormat - 1;
count = stw_pixelformat_get_extended_count();
if (index >= count)
struct pipe_screen *screen;
struct pipe_surface *surface;
+ if (!stw_dev)
+ return FALSE;
+
fb = stw_framebuffer_from_hdc( hdc );
if (fb == NULL)
return FALSE;
struct stw_framebuffer *fb;
struct pipe_surface *surface = NULL;
+ if (!stw_dev)
+ return FALSE;
+
fb = stw_framebuffer_from_hdc( hdc );
if (fb == NULL)
return FALSE;
#include "glapi/glapi.h"
#include "stw_ext_gallium.h"
+#include "stw_device.h"
+#include "stw_icd.h"
struct stw_extension_entry
{
{
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)