emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix for Emacs Crash


From: Jason Rumney
Subject: Re: Fix for Emacs Crash
Date: 07 Nov 2002 19:47:57 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

"Ben Key" <address@hidden> writes:

> +    set_menu_item_info (
> +        menu,
> +        item != NULL ? (UINT) item : (UINT) wv->call_data,
> +        item != NULL ? FALSE : TRUE,
> +        &info);

> * I interpreted the line
>   item != NULL ? (UINT) item : (UINT) wv->call_data,
> to mean if item is not NULL, use the specified menu identifier, otherwise
> use the position specified by the call_data member of the wv structure.

I don't think call_data specifies a position, but it may be by chance
that things work correctly in many cases where item == NULL by
assuming it does.

You will have to figure out what wv->call_data and item represent by
studying the rest of the code. My memory is sketchy, but I think that
item can be NULL for menu titles and separator lines. In the title
case, wv->call_data might be NULL as well, so your modified code does
the right thing even though the assumptions behind it are wrong,
since titles are at position 0. But I am not sure what happens in the
separator case.

> * Based upon this interpretation, passing SetMenuItemInfo a value of FALSE
> for the fByPosition parameter unconditionally is obviously incorrect.
> Instead fByPosition should only be FALSE if item is non NULL.

I think this part of your interpretation is correct.

Thanks for tracking this down.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]