2009/4/19 Christian Costa <titan.co...@wanadoo.fr>:
> @@ -760,6 +760,8 @@ IDirect3DViewportImpl_AddLight(IDirect3DViewport3 *iface,
>          lpDirect3DLightImpl->activate(lpDirect3DLightImpl);
>      }
>
> +    IDirect3DLight_AddRef(lpDirect3DLight);
> +
>      LeaveCriticalSection(&ddraw_cs);
>      return D3D_OK;
>  }
> @@ -798,6 +800,7 @@ IDirect3DViewportImpl_DeleteLight(IDirect3DViewport3 
> *iface,
>           cur_light->active_viewport = NULL;
>           This->num_lights--;
>           This->map_lights &= ~(1<<lpDirect3DLightImpl->dwLightIndex);
> +            IDirect3DLight_Release(lpDirect3DLight);
>              LeaveCriticalSection(&ddraw_cs);
>              return D3D_OK;
>       }
The patch looks ok in principle, but I think it's nicer to keep these
close to the code that actually manipulates the list.


Reply via email to