Correct handling of unusual vendor strings in d3d8, and check for a
stateblock before trying to release it in wined3d.
This commit is contained in:
parent
c978697882
commit
6bec623edb
|
@ -264,8 +264,10 @@ static void IDirect3D8Impl_FillGLCaps(LPDIRECT3D8 iface, Display* display) {
|
|||
case VENDOR_ATI:
|
||||
major = minor = 0;
|
||||
gl_string_cursor = strchr(gl_string, '-');
|
||||
if (gl_string_cursor++) {
|
||||
if (gl_string_cursor) {
|
||||
int error = 0;
|
||||
gl_string_cursor++;
|
||||
|
||||
/* Check if version number is of the form x.y.z */
|
||||
if (*gl_string_cursor > '9' && *gl_string_cursor < '0')
|
||||
error = 1;
|
||||
|
|
|
@ -3616,7 +3616,8 @@ ULONG WINAPI IWineD3DDeviceImpl_Release(IWineD3DDevice *iface) {
|
|||
TRACE("(%p) : Releasing from %ld\n", This, refCount + 1);
|
||||
|
||||
if (!refCount) {
|
||||
IWineD3DStateBlock_Release((IWineD3DStateBlock *)This->stateBlock);
|
||||
/*TODO: Remove me once d3d8 stateblocks are converted */
|
||||
if (This->stateBlock) IWineD3DStateBlock_Release((IWineD3DStateBlock *)This->stateBlock);
|
||||
IWineD3D_Release(This->wineD3D);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue