winex11.drv: Try to work around an access violation in dib_convert

Dmitry Timoshkov dmitry at codeweavers.com
Fri Mar 2 20:56:47 CST 2007


"Louis. Lenders" <xerox_xerox2000 at yahoo.co.uk> wrote:

> @@ -849,7 +858,17 @@ static void convert_888_to_0888_asis(int
>         for (x=0; x < w2; x++) {
>             /* Do 4 pixels at a time: 3 dwords in and 4 dwords out */
>             DWORD srcval1,srcval2;
> -            srcval1=srcpixel[0];
> +            /* Some apps crash in following code-line, possibly they pass a bad pointer*/ 
> +            __TRY
> +            {
> +              srcval1=srcpixel[0];
> +            }
> +            __EXCEPT(exception_filter)
> +            {
> +              return;
> +            }
> +            __ENDTRY;

An exception handler should be set around the whole conversion cycle, not
around a single pixel read since it's a very expensive (slow) operation
in Wine (unlike in Windows).

-- 
Dmitry.



More information about the wine-devel mailing list