From 15e5ad74c914e0a7cbec0fe968e67ba9553bdd00 Mon Sep 17 00:00:00 2001 From: wadealer Date: Tue, 21 Feb 2012 12:39:53 +0200 Subject: [PATCH] try to fix crash on awesome with new dbus popups --- patches/1100-psiplus-new-popups.diff | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/patches/1100-psiplus-new-popups.diff b/patches/1100-psiplus-new-popups.diff index ead3bd0..d268216 100644 --- a/patches/1100-psiplus-new-popups.diff +++ b/patches/1100-psiplus-new-popups.diff @@ -1802,7 +1802,7 @@ void accountAdded(PsiAccount *); --- psi.orig/src/psidbusnotifier.cpp +++ psi/src/psidbusnotifier.cpp -@@ -0,0 +1,368 @@ +@@ -0,0 +1,375 @@ +/* + * psidbusnotifier.cpp: Psi's interface to org.freedesktop.Notify + * Copyright (C) 2012 Khryukin Evgeny @@ -1849,6 +1849,7 @@ +#include "psioptions.h" +#include "psicon.h" + ++#include + +static int minLifeTime = 5000; + @@ -2123,12 +2124,18 @@ + +void PsiDBusNotifier::asyncCallFinished(QDBusPendingCallWatcher *watcher) +{ -+ QDBusPendingReply repl(*watcher); -+ if(repl.value() == 0) { ++ QDBusMessage m = watcher->reply(); ++ if(m.type() == QDBusMessage::InvalidMessage || m.arguments().isEmpty()) { ++ readyToDie(); ++ return; ++ } ++ ++ QVariant repl = m.arguments().first(); ++ if(repl.type() != QVariant::UInt || repl.toUInt() == 0) { + readyToDie(); + } + else { -+ id_ = repl.value(); ++ id_ = repl.toUInt(); + } +} +