]> git.eshelyaron.com Git - emacs.git/commitdiff
Prevent leak in GDI objects (bug #14850).
authorEli Zaretskii <eliz@gnu.org>
Sat, 13 Jul 2013 14:21:01 +0000 (17:21 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 13 Jul 2013 14:21:01 +0000 (17:21 +0300)
 src/w32term.c (x_draw_hollow_cursor): Delete the brush object when
 returning early.

src/ChangeLog
src/w32term.c

index 4bd72f831cd3f4532032b81c6303bb463e9adca0..101672baa1eae84791fb755422465da41e38cfda 100644 (file)
@@ -1,5 +1,8 @@
 2013-07-13  Eli Zaretskii  <eliz@gnu.org>
 
+       * w32term.c (x_draw_hollow_cursor): Delete the brush object when
+       returning early.  (Bug#14850)
+
        * coding.c (syms_of_coding): Set up inhibit-null-byte-detection
        and inhibit-iso-escape-detection attributes of 'undecided'.
        (Bug#14822)
index c9951ca1d52a61b9b88ab6a7213acdd8d0facf1a..732a4f4bfef2fcbc00bbd790894e92672a1185f4 100644 (file)
@@ -5174,7 +5174,10 @@ x_draw_hollow_cursor (struct window *w, struct glyph_row *row)
      the current matrix is invalid or such, give up.  */
   cursor_glyph = get_phys_cursor_glyph (w);
   if (cursor_glyph == NULL)
-    return;
+    {
+      DeleteObject (hb);
+      return;
+    }
 
   /* Compute frame-relative coordinates for phys cursor.  */
   get_phys_cursor_geometry (w, row, cursor_glyph, &left, &top, &h);