[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [dferry] serialization: Arguments::Writer::isValid(): make it more likely to work.
From:       Andreas Hartmetz <ahartmetz () gmail ! com>
Date:       2016-10-12 0:57:07
Message-ID: E1bu7r1-0007PZ-TC () code ! kde ! org
[Download RAW message or body]

Git commit 61543aae28ede55f4c49c7f603aa143864c99f59 by Andreas Hartmetz.
Committed on 11/10/2016 at 22:08.
Pushed by ahartmetz into branch 'master'.

Arguments::Writer::isValid(): make it more likely to work.

d->m_args.error() is at best a copy of d->m_error and at worst
a source of crashes if d->m_args is a moved-from empty shell.

M  +1    -1    serialization/arguments.cpp

http://commits.kde.org/dferry/61543aae28ede55f4c49c7f603aa143864c99f59

diff --git a/serialization/arguments.cpp b/serialization/arguments.cpp
index f5193d0..2783a66 100644
--- a/serialization/arguments.cpp
+++ b/serialization/arguments.cpp
@@ -1765,7 +1765,7 @@ Arguments::Writer::~Writer()
 =

 bool Arguments::Writer::isValid() const
 {
-    return !d->m_args.error().isError();
+    return !d->m_error.isError();
 }
 =

 Error Arguments::Writer::error() const

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic