summaryrefslogtreecommitdiff
path: root/qt4/TelepathyQt4
diff options
context:
space:
mode:
Diffstat (limited to 'qt4/TelepathyQt4')
-rw-r--r--qt4/TelepathyQt4/simple-stream-tube-handler.cpp2
-rw-r--r--qt4/TelepathyQt4/stream-tube-client.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/qt4/TelepathyQt4/simple-stream-tube-handler.cpp b/qt4/TelepathyQt4/simple-stream-tube-handler.cpp
index 7e06e71d9..c5b1c5fb8 100644
--- a/qt4/TelepathyQt4/simple-stream-tube-handler.cpp
+++ b/qt4/TelepathyQt4/simple-stream-tube-handler.cpp
@@ -40,8 +40,6 @@ namespace
ChannelClassSpecList buildFilter(const QStringList &p2pServices,
const QStringList &roomServices, bool requested)
{
- Q_ASSERT(!p2pServices.isEmpty() || !roomServices.isEmpty());
-
ChannelClassSpecList filter;
foreach (const QString &service, p2pServices)
diff --git a/qt4/TelepathyQt4/stream-tube-client.cpp b/qt4/TelepathyQt4/stream-tube-client.cpp
index 4dad023f6..ae50ebd7a 100644
--- a/qt4/TelepathyQt4/stream-tube-client.cpp
+++ b/qt4/TelepathyQt4/stream-tube-client.cpp
@@ -237,6 +237,11 @@ StreamTubeClientPtr StreamTubeClient::create(
bool monitorConnections,
bool bypassApproval)
{
+ if (p2pServices.isEmpty() && roomServices.isEmpty()) {
+ warning() << "Tried to create a StreamTubeClient with no services, returning NULL";
+ return StreamTubeClientPtr();
+ }
+
return StreamTubeClientPtr(
new StreamTubeClient(registrar, p2pServices, roomServices, clientName,
monitorConnections, bypassApproval));