[Pkg-owncloud-commits] [owncloud-client] 13/69: Make two more asserts usable in nondebug
Sandro Knauß
hefee-guest at moszumanska.debian.org
Fri Nov 7 19:41:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 4c1a0005e674414ddaee72af1134fbd3bc4bcd4b
Author: Markus Goetz <markus at woboq.com>
Date: Mon Oct 27 16:01:18 2014 +0100
Make two more asserts usable in nondebug
---
src/mirall/application.cpp | 4 ++++
src/mirall/clientproxy.cpp | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/src/mirall/application.cpp b/src/mirall/application.cpp
index 747fc3d..91a2a67 100644
--- a/src/mirall/application.cpp
+++ b/src/mirall/application.cpp
@@ -252,6 +252,10 @@ void Application::slotCredentialsFetched()
{
Account *account = AccountManager::instance()->account();
Q_ASSERT(account);
+ if (!account) {
+ qDebug() << Q_FUNC_INFO << "No account!";
+ return;
+ }
disconnect(account->credentials(), SIGNAL(fetched()), this, SLOT(slotCredentialsFetched()));
if (!account->credentials()->ready()) {
// User canceled the connection or did not give a password
diff --git a/src/mirall/clientproxy.cpp b/src/mirall/clientproxy.cpp
index 4b03b8b..f2d0557 100644
--- a/src/mirall/clientproxy.cpp
+++ b/src/mirall/clientproxy.cpp
@@ -101,6 +101,10 @@ void ClientProxy::setCSyncProxy( const QUrl& url, CSYNC *csync_ctx )
QList<QNetworkProxy> proxies = QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery(url));
// We set at least one in Application
Q_ASSERT(proxies.count() > 0);
+ if (proxyes.count == 0) {
+ qDebug() << Q_FUNC_INFO << "No proxy!";
+ return;
+ }
QNetworkProxy proxy = proxies.first();
if (proxy.type() == QNetworkProxy::NoProxy) {
qDebug() << "Passing NO proxy to csync for" << url.toString();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list