From: Eli Zaretskii Date: Wed, 9 Oct 2013 14:53:13 +0000 (+0300) Subject: Fix bug #15565 with assertion violations in x_free_gc. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1320 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=051277bf8543f2d5b4c1d0a062d7bd4bbd847918;p=emacs.git 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index a205ea72b7f..eee3ee8237e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-10-09 Eli Zaretskii + + * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass + expressions with side effects to eassert. (Bug#15565) + 2013-10-09 Stefan Monnier * 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 x_free_gc (struct frame *f, GC gc) { eassert (input_blocked_p ()); - IF_DEBUG (eassert (--ngcs >= 0)); + IF_DEBUG ((--ngcs, eassert (ngcs >= 0))); XFreeGC (FRAME_X_DISPLAY (f), gc); } @@ -629,7 +629,7 @@ x_create_gc (struct frame *f, unsigned long mask, XGCValues *xgcv) static void x_free_gc (struct frame *f, GC gc) { - IF_DEBUG (eassert (--ngcs >= 0)); + IF_DEBUG ((--ngcs, eassert (ngcs >= 0))); xfree (gc); }