Avoid crashes in ddraw.dll when loading it without x11drv, for
instance from wineprefixcreate in a text mode console.
This commit is contained in:
parent
d921d161c4
commit
627260f89e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue