[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix for Emacs Crash
From: |
bkey1 |
Subject: |
Re: Fix for Emacs Crash |
Date: |
Thu, 7 Nov 2002 16:08:04 US/Eastern |
Jason Rumney [mailto:address@hidden wrote:
> > + 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.
The line
item != NULL ? (UINT) item : (UINT) wv->call_data,
was part of the original code. That is what lead me to come to the conclusions
I made about the role of wv->call_data.
However, I will do some further debugging tonight to determine if these
conclusions are correct.