aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2013-10-09 17:53:13 +0300
committerEli Zaretskii2013-10-09 17:53:13 +0300
commit051277bf8543f2d5b4c1d0a062d7bd4bbd847918 (patch)
tree02e94972bcdd070ab3f4177889aee9dba357af4f
parent95273451b46b6b014da891128e969c68fc77ffd8 (diff)
downloademacs-051277bf8543f2d5b4c1d0a062d7bd4bbd847918.tar.gz
emacs-051277bf8543f2d5b4c1d0a062d7bd4bbd847918.zip
Fix bug #15565 with assertion violations in x_free_gc.
src/xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass expressions with side effects to eassert.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xfaces.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a205ea72b7f..eee3ee8237e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12013-10-09 Eli Zaretskii <eliz@gnu.org>
2
3 * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass
4 expressions with side effects to eassert. (Bug#15565)
5
12013-10-09 Stefan Monnier <monnier@iro.umontreal.ca> 62013-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * fns.c (hashfn_user_defined): Allow hash functions to return any 8 * fns.c (hashfn_user_defined): Allow hash functions to return any
diff --git a/src/xfaces.c b/src/xfaces.c
index 8d78a28eab1..7e83972955c 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -603,7 +603,7 @@ static void
603x_free_gc (struct frame *f, GC gc) 603x_free_gc (struct frame *f, GC gc)
604{ 604{
605 eassert (input_blocked_p ()); 605 eassert (input_blocked_p ());
606 IF_DEBUG (eassert (--ngcs >= 0)); 606 IF_DEBUG ((--ngcs, eassert (ngcs >= 0)));
607 XFreeGC (FRAME_X_DISPLAY (f), gc); 607 XFreeGC (FRAME_X_DISPLAY (f), gc);
608} 608}
609 609
@@ -629,7 +629,7 @@ x_create_gc (struct frame *f, unsigned long mask, XGCValues *xgcv)
629static void 629static void
630x_free_gc (struct frame *f, GC gc) 630x_free_gc (struct frame *f, GC gc)
631{ 631{
632 IF_DEBUG (eassert (--ngcs >= 0)); 632 IF_DEBUG ((--ngcs, eassert (ngcs >= 0)));
633 xfree (gc); 633 xfree (gc);
634} 634}
635 635