aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/PlatWin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r--win32/PlatWin.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index c3c6b609a..144077b95 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -124,9 +124,13 @@ void LoadD2DOnce() noexcept {
}
}
-bool LoadD2D() {
+bool LoadD2D() noexcept {
static std::once_flag once;
- std::call_once(once, LoadD2DOnce);
+ try {
+ std::call_once(once, LoadD2DOnce);
+ } catch (...) {
+ // ignore
+ }
return pIDWriteFactory && pD2DFactory;
}