]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix a crash inside Haiku popup menus
authorPo Lu <luangruo@yahoo.com>
Fri, 11 Mar 2022 12:41:30 +0000 (12:41 +0000)
committerPo Lu <luangruo@yahoo.com>
Fri, 11 Mar 2022 12:41:30 +0000 (12:41 +0000)
* src/haiku_support.cc (BMenu_run): Handle B_WOULD_BLOCK from
wait_for_objects loop.

src/haiku_support.cc

index 9b85cd6e0ac84d6e892df5d7ef28721ac7a4f919..dcea69bb9a7014b48434e8a64ce46bbf04bf2320 100644 (file)
@@ -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");