From 610d85782bcf71a7821a2019055e7b411e28caec Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 11 Mar 2022 12:41:30 +0000 Subject: [PATCH] Fix a crash inside Haiku popup menus * src/haiku_support.cc (BMenu_run): Handle B_WOULD_BLOCK from wait_for_objects loop. --- src/haiku_support.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"); -- 2.39.2