Stefan Dösinger <[EMAIL PROTECTED]> writes:
> @@ -245,11 +252,12 @@ void
> IDirectDrawImpl_Destroy(IDirectDrawImpl *This)
> {
> IDirectDrawImpl *prev;
> + DDOBJ_LOCK(This);
You shouldn't need locking in Destroy, if the refcount is zero no one
else can be using the object.
> for(prev = ddraw_list; prev; prev = prev->next)
> + {
> if(prev->next == This) break;
> + }
>
> if(prev)
> + {
> + DDOBJ_LOCK(prev);
> prev->next = This->next;
> + DDOBJ_UNLOCK(prev);
> + }
You can't lock just one object, you have the protect the whole list.
--
Alexandre Julliard
[EMAIL PROTECTED]