RagePhoto: avoid setData() replacing it's own RagePhotoData

This commit is contained in:
Syping 2023-01-08 18:34:47 +01:00
parent 96eae4f957
commit 1173db1aa8
1 changed files with 3 additions and 0 deletions

View File

@ -939,6 +939,9 @@ inline void RagePhoto::setBufferOffsets(RagePhotoData *ragePhotoData)
bool RagePhoto::setData(RagePhotoData *ragePhotoData, bool takeOwnership)
{
if (m_data == ragePhotoData)
return true;
if (takeOwnership) {
std::free(m_data->jpeg);
std::free(m_data->description);