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()) {