Fixes a null pointer call

It seems like the case is possible as we already are treating the case in isUserBanned. Doesn't seem ideal as it shows "" where the username should be but it's better than a crash.


Here's the backtrace:

#0  0x00007ae01604f805 in QJsonObject::value(QLatin1String) const () from /usr/lib/x86_64-linux-gnu/libQt6Core.so.6
[Current thread is 1 (Thread 0x7ae0112f3a40 (LWP 2))]
(gdb) where
#0  0x00007ae01604f805 in QJsonObject::value(QLatin1String) const () at /usr/lib/x86_64-linux-gnu/libQt6Core.so.6
#1  0x00006329a3d0e8bd in QJsonObject::operator[] (this=<optimized out>, key=...) at /usr/include/QtCore/qjsonobject.h:61
#2  Quotient::RoomEvent::senderId (this=<optimized out>) at /run/build/libQuotient/Quotient/events/roomevent.cpp:39
#3  0x00006329a3a0431d in NeoChatRoom::invitingUserId (this=0x6329e6b0bfb0) at /home/apol/devel/frameworks6/neochat/src/libneochat/neochatroom.cpp:1663
#4  0x00006329a3a05630 in NeoChatRoom::qt_static_metacall (_o=0x6329e6b0bfb0, _c=QMetaObject::InvokeMetaMethod, _id=72, _a=0x7ffd2c48d190)
    at /home/apol/devel/frameworks6/neochat/.flatpak-builder/kdevelop/build-x86_64 - org.kde.neochatneochat/src/libneochat/LibNeoChat_autogen/include/moc_neochatroom.cpp:776
#5  0x00006329a3a0685c in NeoChatRoom::qt_metacall (this=0x6329e6b0bfb0, _c=QMetaObject::InvokeMetaMethod, _id=72, _a=0x7ffd2c48d190)
    at /home/apol/devel/frameworks6/neochat/.flatpak-builder/kdevelop/build-x86_64 - org.kde.neochatneochat/src/libneochat/LibNeoChat_autogen/include/moc_neochatroom.cpp:1018

Merge request reports

Loading