diff options
Diffstat (limited to 'fxjs')
-rw-r--r-- | fxjs/cfxjse_class.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fxjs/cfxjse_class.cpp b/fxjs/cfxjse_class.cpp index de22af7681..6ccc0e2e24 100644 --- a/fxjs/cfxjse_class.cpp +++ b/fxjs/cfxjse_class.cpp @@ -289,9 +289,10 @@ void NamedPropertySetterCallback( new CFXJSE_Value(info.GetIsolate())); lpThisValue->ForceSetValue(thisObject); - CFXJSE_Value* lpNewValue = new CFXJSE_Value(info.GetIsolate()); + std::unique_ptr<CFXJSE_Value> lpNewValue(new CFXJSE_Value(info.GetIsolate())); lpNewValue->ForceSetValue(value); - DynPropSetterAdapter(lpClass, lpThisValue.get(), szFxPropName, lpNewValue); + DynPropSetterAdapter(lpClass, lpThisValue.get(), szFxPropName, + lpNewValue.get()); info.GetReturnValue().Set(value); } |