From 76c1f6770620b280a8d597a3c7f5c57c86b9918c Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Sat, 31 Dec 2022 14:38:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/HGProductionTool/form_maininterface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/HGProductionTool/form_maininterface.cpp b/app/HGProductionTool/form_maininterface.cpp index 01c25f0..d0c271e 100644 --- a/app/HGProductionTool/form_maininterface.cpp +++ b/app/HGProductionTool/form_maininterface.cpp @@ -508,7 +508,7 @@ void Form_mainInterface::updateUiEnabled(bool enable) void Form_mainInterface::setGlobalCfg(AnalysisJson analysisJson) { AnalysisJson::json_global jsonGlobal = analysisJson.GetGlobal(); - LPWRITECFG p; + LPWRITECFG p = new WRITECFG; p->cat = WRITE_CAT_VID; p->val = &jsonGlobal.vid_to; @@ -529,6 +529,8 @@ void Form_mainInterface::setGlobalCfg(AnalysisJson analysisJson) p->cat = WRITE_CAT_SERIALNUM; p->val = &m_serialNum; func_test_go((const wchar_t*)WRITE_CFG_NAME, (const wchar_t*)p, m_hg); + + delete p; } void Form_mainInterface::on_tableWidget_currentItemChanged(QTableWidgetItem *current, QTableWidgetItem *previous)