From c55b99e23fffff0a4472b51408bbdcb60e58d1d2 Mon Sep 17 00:00:00 2001 From: Syping Date: Mon, 25 Mar 2024 13:15:26 +0100 Subject: [PATCH] RagePhoto: dont take reference from save function --- src/core/RagePhoto.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/RagePhoto.cpp b/src/core/RagePhoto.cpp index fa83623..9f321f1 100644 --- a/src/core/RagePhoto.cpp +++ b/src/core/RagePhoto.cpp @@ -986,7 +986,7 @@ const std::string RagePhoto::save(bool *ok) bool RagePhoto::saveFile(const char *filename, uint32_t photoFormat) { bool ok; - const std::string &sdata = save(photoFormat, &ok); + const std::string sdata = save(photoFormat, &ok); if (ok) { std::ofstream ofs(filename, std::ios::out | std::ios::binary | std::ios::trunc); if (!ofs.is_open()) {