diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-11-03 13:19:10 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-11-03 21:42:53 +0100 |
commit | de811bb2359757b90a0a9851963bd8702b97dab0 (patch) | |
tree | c158682545bb674b59d0ff6f80fee30f8fcbebca | |
parent | 39285d3621674097c415808084178faff6691664 (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>
(cherry picked from commit 11459949e920fab6074bab85e3e1a748e9aee1ee)
Reviewed-on: https://gerrit.libreoffice.org/44253
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | vcl/win/gdi/winlayout.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index 47eda10aedf3..f9d1c2812066 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -562,7 +562,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; |