Merged luisangelsm/yacreader/develop into develop

This commit is contained in:
Felix Kauselmann
2018-01-03 10:32:06 +01:00
parent 1c232b0549
commit 8f886661c6
7 changed files with 200 additions and 54 deletions

View File

@ -1341,8 +1341,20 @@ YACReaderPageFlowGL::~YACReaderPageFlowGL()
this->killTimer(timerId);
//worker->deleteLater();
rawImages.clear();
for(int i = 0;i<numObjects;i++){
delete(images[i].texture);
//TODO: remove checking for a valid context
//checking is needed because of this bug this bug: https://bugreports.qt.io/browse/QTBUG-60148
if (this->context() != nullptr && this->context()->isValid())
{
for(int i = 0; i<numObjects; i++) {
if (images[i].texture != defaultTexture) {
delete(images[i].texture);
}
}
}
if (defaultTexture != nullptr) {
delete defaultTexture;
}
}