diff --git a/plugins/wcocr/wcocr.cpp b/plugins/wcocr/wcocr.cpp index 6a294133..9db65784 100644 --- a/plugins/wcocr/wcocr.cpp +++ b/plugins/wcocr/wcocr.cpp @@ -39,7 +39,7 @@ DECLARE char *wcocr_ocr(void *pobj, const char *u8path) return 0; std::vector rets; std::vector xs, ys, xs2, ys2; - nlohmann::json js; + nlohmann::json js = std::vector{}; for (auto &blk : res.ocr_response) { js.push_back({blk.left, blk.top, blk.right, blk.bottom, blk.text});