changeset 57267:617e54beffb6

* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap) (w32_init_fringe, w32_reset_fringes): Fix bootstrap (NULL rif).
author Kim F. Storm <storm@cua.dk>
date Wed, 29 Sep 2004 08:51:40 +0000
parents c670bc6778bf
children 6ce2eaa4905a
files src/fringe.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/fringe.c	Wed Sep 29 08:51:14 2004 +0000
+++ b/src/fringe.c	Wed Sep 29 08:51:40 2004 +0000
@@ -1079,7 +1079,7 @@
   fbp = &fringe_bitmaps[n];
   if (*fbp && (*fbp)->dynamic)
     {
-      if (rif->destroy_fringe_bitmap)
+      if (rif && rif->destroy_fringe_bitmap)
 	rif->destroy_fringe_bitmap (n);
       xfree (*fbp);
       *fbp = NULL;
@@ -1185,7 +1185,7 @@
     {
       destroy_fringe_bitmap (which);
 
-      if (rif->define_fringe_bitmap)
+      if (rif && rif->define_fringe_bitmap)
 	rif->define_fringe_bitmap (which, fb->bits, fb->height, fb->width);
 
       fringe_bitmaps[which] = fb;
@@ -1445,6 +1445,9 @@
 {
   enum fringe_bitmap_type bt;
 
+  if (!rif)
+    return;
+
   for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++)
     {
       struct fringe_bitmap *fb = &standard_bitmaps[bt];
@@ -1458,6 +1461,9 @@
   /* Destroy row bitmaps.  */
   int bt;
 
+  if (!rif)
+    return;
+
   for (bt = NO_FRINGE_BITMAP + 1; bt < max_used_fringe_bitmap; bt++)
     rif->destroy_fringe_bitmap (bt);
 }