summaryrefslogtreecommitdiff
path: root/dtrans
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-10-10 16:37:15 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2018-10-10 20:13:56 +0200
commit9eb489da4682a89ab96b0d6a8ba13418aac4ca9d (patch)
tree2bec19cc7957e59644805e2b36bd9c41b3740c3c /dtrans
parentfb0c1cf19af461795afd24ab7c4cd36e24cec1c6 (diff)
Properly check HRESULT
Although the IEnumFORMATETC::Next documentation only mentions S_OK and S_FALSE, there are error codes that also may be returned: e.g., 0x800706BA RPC server unavailable (encountered locally in a unit test). In that case, this used to loop infinitely. We are only interested in S_OK result, so check for it. Change-Id: I062e409e84efb68353321f7c48d922ec83191f73 Reviewed-on: https://gerrit.libreoffice.org/61621 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'dtrans')
-rw-r--r--dtrans/source/win32/dtobj/DOTransferable.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx
index 2b3f5ff2e890..db70196e18a3 100644
--- a/dtrans/source/win32/dtobj/DOTransferable.cxx
+++ b/dtrans/source/win32/dtobj/DOTransferable.cxx
@@ -281,7 +281,7 @@ void CDOTransferable::initFlavorList( )
pEnumFormatEtc->Reset( );
FORMATETC fetc;
- while ( S_FALSE != pEnumFormatEtc->Next( 1, &fetc, nullptr ) )
+ while ( S_OK == pEnumFormatEtc->Next( 1, &fetc, nullptr ) )
{
// we use locales only to determine the
// charset if there is text on the cliboard