- switch (ctxt->ctxt_type) {
- case ELT_SOUR_DATA:
- source_add_event(ctxt, evt); break;
- default:
- UNEXPECTED_CONTEXT(ctxt->ctxt_type);
+ if (! evt->recorded_events) {
+ MEMORY_ERROR;
+ free(evt);
+ }
+ else {
+ switch (ctxt->ctxt_type) {
+ case ELT_SOUR_DATA:
+ source_add_event(ctxt, evt); break;
+ default:
+ UNEXPECTED_CONTEXT(ctxt->ctxt_type);
+ }
+ result = MAKE_GOM_CTXT(elt, source_event, evt);
+ }