emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 5fb262597f: Handle allocation failures of fringe bitmaps on Haiku


From: Po Lu
Subject: master 5fb262597f: Handle allocation failures of fringe bitmaps on Haiku
Date: Mon, 14 Feb 2022 02:13:34 -0500 (EST)

branch: master
commit 5fb262597f9eba4d90667e5c24581e93b5516edc
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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 9d128f6a6a..4547380783 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]