From: Po Lu Date: Fri, 11 Mar 2022 12:41:30 +0000 (+0000) Subject: Fix a crash inside Haiku popup menus X-Git-Tag: emacs-29.0.90~1931^2~1195 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=610d85782bcf71a7821a2019055e7b411e28caec;p=emacs.git Fix a crash inside Haiku popup menus * src/haiku_support.cc (BMenu_run): Handle B_WOULD_BLOCK from wait_for_objects loop. --- diff --git a/src/haiku_support.cc b/src/haiku_support.cc index 9b85cd6e0ac..dcea69bb9a7 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc @@ -2787,7 +2787,8 @@ BMenu_run (void *menu, int x, int y, if ((stat = wait_for_objects_etc ((object_wait_info *) &infos, 3, B_RELATIVE_TIMEOUT, timeout)) < B_OK) { - if (stat == B_INTERRUPTED || stat == B_TIMED_OUT) + if (stat == B_INTERRUPTED || stat == B_TIMED_OUT + || stat == B_WOULD_BLOCK) continue; else gui_abort ("Failed to wait for popup");