wineqtdecoder: properly clean up splitter and loader threads on QTSplitter destruction

Alexandre Julliard julliard at winehq.org
Tue Nov 20 05:29:14 CST 2012


Aric Stewart <aric at codeweavers.com> writes:

> @@ -495,9 +518,14 @@ static DWORD WINAPI QTSplitter_loading_thread(LPVOID data)
>              to try to minimize that.
>           */
>  
> -        while(GetMovieLoadState(This->pQTMovie) < kMovieLoadStateComplete)
> +        while(This->pQTMovie && GetMovieLoadState(This->pQTMovie) < kMovieLoadStateComplete)
>          {
>              EnterCriticalSection(&This->csReceive);
> +            if (!This || !This->pQTMovie)
> +            {
> +                LeaveCriticalSection(&This->csReceive);
> +                return 0;
> +            }

This doesn't make sense. The this pointer cannot become NULL, and the
whole thing should most likely be inside the critical section.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list