From 6d62e0a0a5b77f91b9cd91f1b53f87e99c053a49 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 3 Feb 2024 06:02:13 -0500 Subject: [PATCH] fix typo Signed-off-by: Jinzhe Zeng --- source/api_c/include/deepmd.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/api_c/include/deepmd.hpp b/source/api_c/include/deepmd.hpp index 9c1514a4a5..966cc1f24e 100644 --- a/source/api_c/include/deepmd.hpp +++ b/source/api_c/include/deepmd.hpp @@ -1933,7 +1933,7 @@ class DipoleChargeModifier { init(model, gpu_rank, name_scope); } catch (...) { // Clean up and rethrow, as the destructor will not be called - if (dp) { + if (dcm) { DP_DeleteDipoleChargeModifier(dcm); } throw;