summaryrefslogtreecommitdiff
path: root/mi/mieq.c
diff options
context:
space:
mode:
Diffstat (limited to 'mi/mieq.c')
-rw-r--r--mi/mieq.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/mi/mieq.c b/mi/mieq.c
index 1b81e4d99..0b6488203 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -110,24 +110,29 @@ mieqInit(void)
miEventQueue.handlers[i] = NULL;
for (i = 0; i < QUEUE_SIZE; i++)
{
- EventListPtr evlist = InitEventList(1);
- if (!evlist)
- FatalError("Could not allocate event queue.\n");
- miEventQueue.events[i].events = evlist;
+ if (miEventQueue.events[i].events == NULL) {
+ EventListPtr evlist = InitEventList(1);
+ if (!evlist)
+ FatalError("Could not allocate event queue.\n");
+ miEventQueue.events[i].events = evlist;
+ }
}
SetInputCheck(&miEventQueue.head, &miEventQueue.tail);
return TRUE;
}
-/* Ensure all events in the EQ are at least size bytes. */
void
-mieqResizeEvents(int min_size)
+mieqFini(void)
{
int i;
-
for (i = 0; i < QUEUE_SIZE; i++)
- SetMinimumEventSize(miEventQueue.events[i].events, 1, min_size);
+ {
+ if (miEventQueue.events[i].events != NULL) {
+ FreeEventList(miEventQueue.events[i].events, 1);
+ miEventQueue.events[i].events = NULL;
+ }
+ }
}
/*