Commit 627260f8 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Avoid crashes in ddraw.dll when loading it without x11drv, for

instance from wineprefixcreate in a text mode console.
parent d921d161
......@@ -4212,6 +4212,12 @@ d3ddevice_init_at_startup(void *gl_handle)
int major, minor, patch, num_parsed;
TRACE("Initializing GL...\n");
if (!drawable)
{
WARN("x11drv not loaded - D3D support disabled!\n");
return FALSE;
}
/* Get a default rendering context to have the 'caps' function query some info from GL */
device_context = GetDC(0);
......
......@@ -213,6 +213,9 @@ static BOOL initialize(void)
static void cleanup(void)
{
DDHAL_DESTROYDRIVERDATA data;
if (!dd_cbs.HALDD.DestroyDriver) return;
data.lpDD = NULL;
data.ddRVal = 0;
data.DestroyDriver = dd_cbs.HALDD.DestroyDriver;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment