1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-24 07:41:54 -07:00

Preventing failure if there is an assertion before event buffers are initialized.

Copied from Perforce
 Change: 182012
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Richard Brooksby 2013-05-20 19:37:59 +01:00
parent 8f4f17e745
commit 9f7a30bfbc

View file

@ -404,6 +404,13 @@ void EventDump(mps_lib_FILE *stream)
AVER(stream != NULL);
/* This can happen if there's a backtrace very early in the life of
the MPS, and will cause an access violation if we continue. */
if (!eventInited) {
WriteF(stream, "No events\n", NULL);
return;
}
for (kind = 0; kind < EventKindLIMIT; ++kind) {
for (event = (Event)EventLast[kind];
event < (Event)(EventBuffer[kind] + EventBufferSIZE);