RagePhoto: avoid setData() replacing it's own RagePhotoData
This commit is contained in:
parent
96eae4f957
commit
1173db1aa8
1 changed files with 3 additions and 0 deletions
|
@ -939,6 +939,9 @@ inline void RagePhoto::setBufferOffsets(RagePhotoData *ragePhotoData)
|
||||||
|
|
||||||
bool RagePhoto::setData(RagePhotoData *ragePhotoData, bool takeOwnership)
|
bool RagePhoto::setData(RagePhotoData *ragePhotoData, bool takeOwnership)
|
||||||
{
|
{
|
||||||
|
if (m_data == ragePhotoData)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (takeOwnership) {
|
if (takeOwnership) {
|
||||||
std::free(m_data->jpeg);
|
std::free(m_data->jpeg);
|
||||||
std::free(m_data->description);
|
std::free(m_data->description);
|
||||||
|
|
Loading…
Reference in a new issue