From 550ab5d438547bed5f719c0e70ad3dfd21accd6a Mon Sep 17 00:00:00 2001 From: SoftFever Date: Thu, 16 Jul 2026 20:09:50 +0800 Subject: [PATCH] Guard the don't-remind command parse and init the checker index --- src/slic3r/GUI/DeviceManager.cpp | 2 +- src/slic3r/GUI/PrePrintChecker.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index bbaf52774f..4651269306 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -2264,10 +2264,10 @@ int MachineObject::command_dont_remind_next_time(json& mqtt_guard_json) mqtt_guard_json["err_index"].empty()) return -1; json j; - j["print"]["command"] = mqtt_guard_json["command"].get(); j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++); try { + j["print"]["command"] = mqtt_guard_json["command"].get(); int err_index = mqtt_guard_json["err_index"].get(); if (mqtt_guard_json.contains("err_ignored") && diff --git a/src/slic3r/GUI/PrePrintChecker.hpp b/src/slic3r/GUI/PrePrintChecker.hpp index b8a69912ca..8b62b5944c 100644 --- a/src/slic3r/GUI/PrePrintChecker.hpp +++ b/src/slic3r/GUI/PrePrintChecker.hpp @@ -26,7 +26,7 @@ struct prePrintInfo wxString wiki_url; wxString link_label; // optional: clickable text appended after msg std::function link_callback; // optional: internal action for link_label click - int index; + int index{0}; public: bool operator==(const prePrintInfo& other) const {