Commit cc3b85445f48d071a9461f0e8ab1078bf98fed5a
1 parent
a19bb601
memory bug fix
Showing
1 changed file
with
1 additions
and
1 deletions
openbr/plugins/gallery.cpp
| ... | ... | @@ -214,7 +214,7 @@ class utGallery : public BinaryGallery |
| 214 | 214 | QDataStream stream(&data, QIODevice::ReadOnly); |
| 215 | 215 | stream >> t; |
| 216 | 216 | } else { |
| 217 | - t.append(cv::Mat(1, data.size(), CV_8UC1, data.data())); | |
| 217 | + t.append(cv::Mat(1, data.size(), CV_8UC1, data.data()).clone() /* We don't want a shallow copy! */); | |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | t.file.set("ImageID", QVariant(QByteArray((const char*)ut->imageID, 16).toHex())); | ... | ... |