diff --git a/mythtv/libs/libmythfreemheg/Engine.cpp b/mythtv/libs/libmythfreemheg/Engine.cpp
index 74c8d73..5b2bcb1 100644
a
|
b
|
void MHEngine::TransitionToScene(const MHObjectRef &target) |
488 | 488 | |
489 | 489 | // Remove any events from the asynch event queue unless they derive from |
490 | 490 | // the application itself or a shared ingredient. |
491 | | MHAsynchEvent *pEvent; |
492 | | QQueue<MHAsynchEvent *>::iterator it = m_EventQueue.begin(); |
493 | 491 | |
494 | | while (it != m_EventQueue.end()) |
495 | | { |
496 | | pEvent = *it; |
| 492 | // This was causing crashes with leftover events being invalid. |
| 493 | // Changed to clear all events at this point. |
497 | 494 | |
498 | | if (!pEvent->pEventSource->IsShared()) |
499 | | { |
500 | | delete pEvent; |
501 | | it = m_EventQueue.erase(it); |
502 | | } |
503 | | else |
504 | | { |
505 | | ++it; |
506 | | } |
507 | | } |
| 495 | while (!m_EventQueue.isEmpty()) |
| 496 | delete m_EventQueue.dequeue(); |
508 | 497 | |
509 | 498 | // Can now actually delete the old scene. |
510 | 499 | if (pApp->m_pCurrentScene) |