From 43001c0a944f558caf29ba9fb22e0e3af1b44f3b Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 14 Feb 2017 10:15:12 -0800 Subject: [PATCH] Fix unreferenced variable warning (issue #2090) --- libcef_dll/ctocpp/ctocpp_scoped.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libcef_dll/ctocpp/ctocpp_scoped.h b/libcef_dll/ctocpp/ctocpp_scoped.h index 8b32de704..39ff502aa 100644 --- a/libcef_dll/ctocpp/ctocpp_scoped.h +++ b/libcef_dll/ctocpp/ctocpp_scoped.h @@ -147,9 +147,11 @@ StructName* CefCToCppScoped::UnwrapOwn( StructName* orig_struct = wrapperStruct->struct_; +#if DCHECK_IS_ON() // We should own the object currently. cef_base_scoped_t* base = reinterpret_cast(orig_struct); DCHECK(base && base->del); +#endif // Don't delete the original object when the wrapper is deleted. wrapperStruct->struct_ = NULL;