diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-11-01 22:11:01 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-11-02 04:33:00 +0100 |
commit | 11459949e920fab6074bab85e3e1a748e9aee1ee (patch) | |
tree | 3171a1b5949498d351e44cfa596f352d6f61b1d3 | |
parent | afe501df00733a80af464d0eac3809c833388877 (diff) |
Related: tdf#113347: properly check HRESULT value
HRESULT's "success" value S_OK is 0; they are failed when their values are
negative. So, the incorrect check resulted in false failures.
Change-Id: I56560ced73e335af49c66d58201d5455e555e431
Reviewed-on: https://gerrit.libreoffice.org/44180
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | vcl/win/gdi/DWriteTextRenderer.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/win/gdi/DWriteTextRenderer.cxx b/vcl/win/gdi/DWriteTextRenderer.cxx index 95dd9e9d9b97..9819ef205aa1 100644 --- a/vcl/win/gdi/DWriteTextRenderer.cxx +++ b/vcl/win/gdi/DWriteTextRenderer.cxx @@ -341,7 +341,7 @@ bool D2DWriteTextOutRenderer::BindFont(HDC hDC) // Initially bind to an empty rectangle to get access to the font face, // we'll update it once we've calculated a bounding rect in DrawGlyphs - if (!BindDC(mhDC = hDC)) + if (FAILED(BindDC(mhDC = hDC))) return false; mlfEmHeight = 0; |