Commit 6bec623e authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

Correct handling of unusual vendor strings in d3d8, and check for a

stateblock before trying to release it in wined3d.
parent c9786978
......@@ -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);
}
......
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