summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Client/CoreClient.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Swiften/Client/CoreClient.cpp b/Swiften/Client/CoreClient.cpp
index 3c7902e..1de1d61 100644
--- a/Swiften/Client/CoreClient.cpp
+++ b/Swiften/Client/CoreClient.cpp
@@ -390,6 +390,10 @@ void CoreClient::sendPresence(std::shared_ptr<Presence> presence) {
}
void CoreClient::sendData(const std::string& data) {
+ if (!sessionStream_) {
+ SWIFT_LOG(warning) << "Client: Trying to send data while disconnected." << std::endl;
+ return;
+ }
sessionStream_->writeData(data);
}