[Pkg-owncloud-commits] [qtkeychain] 19/35: kwallet: check is reply is valid
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue May 24 17:40:00 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository qtkeychain.
commit 6d361e673ab36dd2f8bd9a3f3135ae46aa44b46b
Author: Ole-André Rodlie <ole-andre.rodlie at inria.fr>
Date: Fri Apr 1 17:50:57 2016 +0200
kwallet: check is reply is valid
---
keychain_unix.cpp | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/keychain_unix.cpp b/keychain_unix.cpp
index 8f44098..ae926e8 100644
--- a/keychain_unix.cpp
+++ b/keychain_unix.cpp
@@ -333,10 +333,14 @@ void ReadPasswordJobPrivate::kwalletFinished( QDBusPendingCallWatcher* watcher )
if ( !watcher->isError() ) {
if ( mode == Binary ) {
QDBusPendingReply<QByteArray> reply = *watcher;
- data = reply.value();
+ if (reply.isValid()) {
+ data = reply.value();
+ }
} else {
QDBusPendingReply<QString> reply = *watcher;
- data = reply.value().toUtf8();
+ if (reply.isValid()) {
+ data = reply.value().toUtf8();
+ }
}
}
@@ -468,10 +472,14 @@ void JobPrivate::kwalletFinished( QDBusPendingCallWatcher* watcher ) {
if ( !watcher->isError() ) {
if ( mode == Binary ) {
QDBusPendingReply<QByteArray> reply = *watcher;
- data = reply.value();
+ if (reply.isValid()) {
+ data = reply.value();
+ }
} else {
QDBusPendingReply<QString> reply = *watcher;
- data = reply.value().toUtf8();
+ if (reply.isValid()) {
+ data = reply.value().toUtf8();
+ }
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/qtkeychain.git
More information about the Pkg-owncloud-commits
mailing list