diff --git a/include/ginkgo/core/base/exception_helpers.hpp b/include/ginkgo/core/base/exception_helpers.hpp index a9a93f15fe8..4a12865f374 100644 --- a/include/ginkgo/core/base/exception_helpers.hpp +++ b/include/ginkgo/core/base/exception_helpers.hpp @@ -733,7 +733,7 @@ inline T ensure_allocated_impl(T ptr, const std::string& file, int line, */ #define GKO_THROW_IF_INVALID(_condition, _message) \ { \ - if (!_condition) { \ + if (!(_condition)) { \ throw ::gko::InvalidStateError(__FILE__, __LINE__, __func__, \ _message); \ } \