[education/rkward] rkward/rbackend: Fix nullpointer dereference during exit.
Thomas Friedrichsmeier
null at kde.org
Fri Oct 20 17:22:09 BST 2023
Git commit c37e1897501f04749d4750fd0611d920694134a2 by Thomas Friedrichsmeier.
Committed on 20/10/2023 at 18:21.
Pushed by tfry into branch 'master'.
Fix nullpointer dereference during exit.
BUG: 475810
M +1 -0 rkward/rbackend/rktransmitter.cpp
https://invent.kde.org/education/rkward/-/commit/c37e1897501f04749d4750fd0611d920694134a2
diff --git a/rkward/rbackend/rktransmitter.cpp b/rkward/rbackend/rktransmitter.cpp
index 09e3de4f3..a39aadc2f 100644
--- a/rkward/rbackend/rktransmitter.cpp
+++ b/rkward/rbackend/rktransmitter.cpp
@@ -269,6 +269,7 @@ void RKAbstractTransmitter::setConnection (QLocalSocket *_connection) {
void RKAbstractTransmitter::disconnected () {
RK_TRACE (RBACKEND);
+ if (!connection) return; // -> May happen in RKRBackendTransmitter::doExit()
handleTransmissionError ("Connection closed unexpectedly. Last error was: " + connection->errorString ());
}
More information about the rkward-tracker
mailing list