Drop the empty exception declaration from CheckError
The function is defined as follows:
namespace _com_util {
inline void CheckError(HRESULT hr) throw() {
if(FAILED(hr)) { _com_issue_error(hr); }
}
}
but _com_issue_error is defined as:
inline void _com_issue_error(HRESULT hr) {
#if __EXCEPTIONS
throw _com_error(hr);
#else
/* This is designed to use exceptions. If exceptions are disabled, there is not much we can do here. */
__debugbreak();
#endif
}
so actually calling it with a failed HRESULT crashes the program. I
think the empty exception specification should simply be dropped.
See https://bugs.debian.org/816427
Reported-by: Sam Morris <sam@robots.org.uk>
Signed-off-by: Stephen Kitt <steve@sk2.org>
Signed-off-by: Liu Hao <lh_mouse@126.com>
1 file changed