msiexec null reference

Mike McCormack mike at codeweavers.com
Thu Dec 22 20:15:49 CST 2005



Bill Medland wrote:

> +    static const WCHAR dfv[] = {
> +        'M','S',' ','S','h','e','l','l',' ','D','l','g',0 };


> +    if (!dialog->default_font)
> +    {
> +        DWORD len = strlenW (dfv) + 1;
> +        dialog->default_font = msi_alloc(len*sizeof(WCHAR));
> +        if (!dialog->default_font) return -1;
> +        memcpy (dialog->default_font, dfv, len*sizeof(WCHAR));
> +    }

How about this?

if (!dialog->default_font)
     dialog->default_font = msi_strdupW( dfv );

Mike



More information about the wine-devel mailing list