mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 04:21:24 +00:00
Improve x_free_gc checking when debugging
* src/xfaces.c (x_free_gc): When debugging, also diagnose unlikely case when ngcs == INT_MIN.
This commit is contained in:
parent
7502836378
commit
43f1630346
1 changed files with 2 additions and 2 deletions
|
|
@ -539,7 +539,7 @@ static void
|
|||
x_free_gc (struct frame *f, GC gc)
|
||||
{
|
||||
eassert (input_blocked_p ());
|
||||
IF_DEBUG ((--ngcs, eassert (ngcs >= 0)));
|
||||
IF_DEBUG ((eassert (ngcs > 0), ngcs--));
|
||||
XFreeGC (FRAME_X_DISPLAY (f), gc);
|
||||
}
|
||||
|
||||
|
|
@ -565,7 +565,7 @@ x_create_gc (struct frame *f, unsigned long mask, Emacs_GC *egc)
|
|||
static void
|
||||
x_free_gc (struct frame *f, Emacs_GC *gc)
|
||||
{
|
||||
IF_DEBUG ((--ngcs, eassert (ngcs >= 0)));
|
||||
IF_DEBUG ((eassert (ngcs > 0), ngcs--));
|
||||
xfree (gc);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue