From 2908525c5c1f0c631811e96994c6913486eef919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Tue, 19 Nov 2024 16:59:59 +0900 Subject: [PATCH] fix: print error on qmc2 creation failure instead of crash. --- src/jobs.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/jobs.hpp b/src/jobs.hpp index 99cd04f..cc3d50b 100644 --- a/src/jobs.hpp +++ b/src/jobs.hpp @@ -59,6 +59,11 @@ class KggTask { } auto qmc2 = QMC2::Create(ekey); + if (!qmc2) { + error(L"create qmc2 instance failed (ekey decode error?)"); + fprintf(stderr, "%s\n", ekey.c_str()); + return; + } std::string magic(4, 0); kgg_stream_in.seekg(offset_to_audio, std::ios::beg);