Avoid using assertions, which would crash applications...

--- a/src/atspiadaptor.cpp
+++ b/src/atspiadaptor.cpp
@@ -976,7 +976,10 @@ void AtSpiAdaptor::notify(int reason, QA
     }
     case QAccessible::TextUpdated: {
         if (sendObject || sendObject_text_changed) {
-            Q_ASSERT(interface->textInterface());
+            if (!interface || !interface->textInterface()) {
+                qDebug() << "Received text event for invalid interface.";
+                return;
+            }
             QString path = pathForInterface(interface, child);
             // at-spi doesn't have a text updated/changed, so remove all and re-add the new text
             QString oldText = interface->object()->property(ACCESSIBLE_LAST_TEXT).toString();
@@ -999,7 +1002,10 @@ void AtSpiAdaptor::notify(int reason, QA
     }
     case QAccessible::TextCaretMoved: {
         if (sendObject || sendObject_text_caret_moved) {
-            Q_ASSERT(interface->textInterface());
+            if (!interface || !interface->textInterface()) {
+                qDebug() << "Received text event for invalid interface.";
+                return;
+            }
             QString path = pathForInterface(interface, child);
             QDBusVariant cursorData;
             int pos = interface->textInterface()->cursorPosition();
@@ -1022,7 +1028,10 @@ void AtSpiAdaptor::notify(int reason, QA
     }
     case QAccessible::ValueChanged: {
             if (sendObject || sendObject_value_changed) {
-                Q_ASSERT(interface->valueInterface());
+                if (!interface || !interface->valueInterface()) {
+                    qDebug() << "Received value event for invalid interface.";
+                    return;
+                }
                 QString path = pathForInterface(interface, child);
                 QVariantList args = packDBusSignalArguments(QLatin1String("accessible-value"), 0, 0, variantForPath(path));
                 sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT),
@@ -1776,7 +1785,7 @@ QSpiActionArray AtSpiAdaptor::getActions
 // Text interface
 bool AtSpiAdaptor::textInterface(QAccessibleInterface *interface, int child, const QString &function, const QDBusMessage &message, const QDBusConnection &connection)
 {
-    Q_ASSERT(child == 0); // We should never claim to have a text interface on a virtual child
+    //Q_ASSERT(child == 0); // We should never claim to have a text interface on a virtual child
     if (!interface->textInterface()) {
         qWarning() << "WARNING Qt AtSpiAdaptor: Could not find text interface for: " << message.path() << interface;
         return false;
