diff options
| author | Gerd Moellmann | 2000-11-30 12:50:08 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-11-30 12:50:08 +0000 |
| commit | 924e171446d7fc27352afc336da80be6a2bfaca3 (patch) | |
| tree | 7cdf0b9b910b3e3f0ba5e4ea55cb1ff6f2b560a2 | |
| parent | 3e40ba92a5d834f327b3b202dde44677ca1c41ed (diff) | |
| download | emacs-924e171446d7fc27352afc336da80be6a2bfaca3.tar.gz emacs-924e171446d7fc27352afc336da80be6a2bfaca3.zip | |
(xm_arm_callback): Handle case that W is null;
also see comment there.
| -rw-r--r-- | lwlib/lwlib-Xm.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c index b33a53e43fc..4a3f097a867 100644 --- a/lwlib/lwlib-Xm.c +++ b/lwlib/lwlib-Xm.c | |||
| @@ -265,26 +265,32 @@ xm_arm_callback (w, client_data, call_data) | |||
| 265 | widget_value *wv = (widget_value *) client_data; | 265 | widget_value *wv = (widget_value *) client_data; |
| 266 | widget_instance *instance; | 266 | widget_instance *instance; |
| 267 | 267 | ||
| 268 | /* Get the id of the menu bar or popup menu this widget is in. */ | 268 | /* During the pretest of 21.1, there was a case where this callback |
| 269 | while (1) | 269 | was called with a null widget on hpux 10.2. I think that's |
| 270 | likely a bug in the Motif lib there. */ | ||
| 271 | if (w != None) | ||
| 270 | { | 272 | { |
| 271 | if (XmIsRowColumn (w)) | 273 | /* Get the id of the menu bar or popup menu this widget is in. */ |
| 274 | while (1) | ||
| 272 | { | 275 | { |
| 273 | unsigned char type = 0xff; | 276 | if (XmIsRowColumn (w)) |
| 277 | { | ||
| 278 | unsigned char type = 0xff; | ||
| 274 | 279 | ||
| 275 | XtVaGetValues (w, XmNrowColumnType, &type, NULL); | 280 | XtVaGetValues (w, XmNrowColumnType, &type, NULL); |
| 276 | if (type == XmMENU_BAR || type == XmMENU_POPUP) | 281 | if (type == XmMENU_BAR || type == XmMENU_POPUP) |
| 277 | break; | 282 | break; |
| 278 | } | 283 | } |
| 279 | 284 | ||
| 280 | w = XtParent (w); | 285 | w = XtParent (w); |
| 281 | } | 286 | } |
| 282 | 287 | ||
| 283 | instance = lw_get_widget_instance (w); | 288 | instance = lw_get_widget_instance (w); |
| 284 | if (instance && instance->info->highlight_cb) | 289 | if (instance && instance->info->highlight_cb) |
| 285 | { | 290 | { |
| 286 | call_data = cbs->reason == XmCR_DISARM ? NULL : wv; | 291 | call_data = cbs->reason == XmCR_DISARM ? NULL : wv; |
| 287 | instance->info->highlight_cb (w, instance->info->id, call_data); | 292 | instance->info->highlight_cb (w, instance->info->id, call_data); |
| 293 | } | ||
| 288 | } | 294 | } |
| 289 | } | 295 | } |
| 290 | 296 | ||