Skip to content

Commit

Permalink
Hopefully fix crash
Browse files Browse the repository at this point in the history
We have 5.7k events of a segfault in sentry when calling socket->readLine()

https://crash-reports.kde.org/organizations/kde/issues/61350/?project=363
  • Loading branch information
albertvaka committed Dec 14, 2024
1 parent ebfd143 commit 6213b65
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/backends/bluetooth/bluetoothlinkprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ void BluetoothLinkProvider::serverDataReceived(const QBluetoothAddress &peer, QS
{
qCDebug(KDECONNECT_CORE) << "BluetoothLinkProvider::serverDataReceived executed";
QByteArray identityArray;
if (!socket) {
qCDebug(KDECONNECT_CORE) << "BluetoothLinkProvider::serverDataReceived but socket no longer exists";
return;
}
socket->startTransaction();
identityArray = socket->readLine();

Expand Down

0 comments on commit 6213b65

Please sign in to comment.