widget_value *wv = (widget_value *) client_data;
widget_instance *instance;
- /* Get the id of the menu bar or popup menu this widget is in. */
- while (1)
+ /* During the pretest of 21.1, there was a case where this callback
+ was called with a null widget on hpux 10.2. I think that's
+ likely a bug in the Motif lib there. */
+ if (w != None)
{
- if (XmIsRowColumn (w))
+ /* Get the id of the menu bar or popup menu this widget is in. */
+ while (1)
{
- unsigned char type = 0xff;
+ if (XmIsRowColumn (w))
+ {
+ unsigned char type = 0xff;
- XtVaGetValues (w, XmNrowColumnType, &type, NULL);
- if (type == XmMENU_BAR || type == XmMENU_POPUP)
- break;
- }
+ XtVaGetValues (w, XmNrowColumnType, &type, NULL);
+ if (type == XmMENU_BAR || type == XmMENU_POPUP)
+ break;
+ }
- w = XtParent (w);
- }
+ w = XtParent (w);
+ }
- instance = lw_get_widget_instance (w);
- if (instance && instance->info->highlight_cb)
- {
- call_data = cbs->reason == XmCR_DISARM ? NULL : wv;
- instance->info->highlight_cb (w, instance->info->id, call_data);
+ instance = lw_get_widget_instance (w);
+ if (instance && instance->info->highlight_cb)
+ {
+ call_data = cbs->reason == XmCR_DISARM ? NULL : wv;
+ instance->info->highlight_cb (w, instance->info->id, call_data);
+ }
}
}