comctl32: Don't crash when getting a bad image list handle.

Alexandre Julliard julliard at winehq.org
Mon Sep 19 07:00:28 CDT 2011


Francois Gouget <fgouget at codeweavers.com> writes:

> @@ -3587,7 +3588,15 @@ static const IImageListVtbl ImageListImpl_Vtbl = {
>  
>  static inline BOOL is_valid(HIMAGELIST himl)
>  {
> -    return himl && himl->lpVtbl == &ImageListImpl_Vtbl;
> +    __TRY
> +    {
> +        return himl && himl->lpVtbl == &ImageListImpl_Vtbl;
> +    }
> +    __EXCEPT_PAGE_FAULT
> +    {
> +        return FALSE;
> +    }
> +    __ENDTRY

You can't return from a __TRY block.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list