Unfortunately dynamic_cast can fail. When it does, it returns a null

From: Erik Hovland <erik@hovland.org>

pointer. So any pointer gotten from a dynamic_cast should be checked.
In mythmainwindow, the eventFilter member function does a
dynamic_cast of the event into a key event.

This patch makes sure we don't dereference that key event pointer if the
dynamic_cast didn't work.
---

 libs/libmythui/mythmainwindow.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libs/libmythui/mythmainwindow.cpp b/libs/libmythui/mythmainwindow.cpp
index 8504cd5..a2b6942 100644
--- a/libs/libmythui/mythmainwindow.cpp
+++ b/libs/libmythui/mythmainwindow.cpp
@@ -1171,6 +1171,8 @@ bool MythMainWindow::eventFilter(QObject *, QEvent *e)
         case QEvent::KeyPress:
         {
             QKeyEvent *ke = dynamic_cast<QKeyEvent*>(e);
+            if (!ke)
+                return false;
 
             if (currentWidget())
             {
