diff src/redisplay-output.c @ 3479:2b84dd8eb906

[xemacs-hg @ 2006-06-27 22:59:37 by james] Don't leak Dynarr's in redisplay. <m3sllwwxja.fsf@jerrypc.cs.usu.edu>
author james
date Tue, 27 Jun 2006 22:59:40 +0000
parents 3d8143fc88e1
children 26dccfc8fa60
line wrap: on
line diff
--- a/src/redisplay-output.c	Tue Jun 27 21:51:09 2006 +0000
+++ b/src/redisplay-output.c	Tue Jun 27 22:59:40 2006 +0000
@@ -1407,7 +1407,7 @@
 {
   Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
   Lisp_Object rest, window = DOMAIN_WINDOW (domain);
-  Ichar_dynarr *buf = Dynarr_new (Ichar);
+  Ichar_dynarr *buf;
   struct window *w = XWINDOW (window);
   struct device *d = DOMAIN_XDEVICE (domain);
   int layout_height, layout_width;
@@ -1424,6 +1424,8 @@
   if (!redisplay_normalize_glyph_area (db, dga))
     return;
 
+  buf = Dynarr_new (Ichar);
+
   /* Highly dodgy optimization. We want to only output the whole
      layout if we really have to. */
   if (!IMAGE_INSTANCE_OPTIMIZE_OUTPUT (p)