From 5fb262597f9eba4d90667e5c24581e93b5516edc Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 14 Feb 2022 07:12:17 +0000 Subject: [PATCH] Handle allocation failures of fringe bitmaps on Haiku * src/haikuterm.c (haiku_define_fringe_bitmap): Handle allocation failures. --- src/haikuterm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/haikuterm.c b/src/haikuterm.c index 9d128f6a6a8..4547380783b 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -2292,8 +2292,12 @@ haiku_define_fringe_bitmap (int which, unsigned short *bits, fringe_bmps[i++] = NULL; } + block_input (); fringe_bmps[which] = BBitmap_new (wd, h, 1); + if (!fringe_bmps[which]) + memory_full (SIZE_MAX); BBitmap_import_fringe_bitmap (fringe_bmps[which], bits, wd, h); + unblock_input (); } static void -- 2.39.5