From 3fcee7a47a827d8f36c5aa7aaec0ceffd05077bc Mon Sep 17 00:00:00 2001 From: serycjon Date: Tue, 7 Feb 2017 15:46:28 +0100 Subject: [PATCH] fix (?) the error when saving to the same file multiple times --- matplotlibcpp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matplotlibcpp.h b/matplotlibcpp.h index a16d370..dee6207 100644 --- a/matplotlibcpp.h +++ b/matplotlibcpp.h @@ -499,7 +499,7 @@ namespace matplotlibcpp { PyObject* res = PyObject_CallObject(detail::_interpreter::get().s_python_function_save, args); if(!res) throw std::runtime_error("Call to save() failed."); - Py_DECREF(pyfilename); + /* Py_DECREF(pyfilename); */ Py_DECREF(args); Py_DECREF(res); }