mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 09:08:20 -04:00
Fix crash when closing YACReader with an empty go to flow gl
This commit is contained in:
parent
d9f3e7707e
commit
5db5fb7e0c
@ -1270,16 +1270,22 @@ YACReaderPageFlowGL::~YACReaderPageFlowGL()
|
||||
|
||||
makeCurrent();
|
||||
|
||||
for(auto image : images) {
|
||||
if (image.texture != defaultTexture) {
|
||||
image.texture->destroy();
|
||||
delete image.texture;
|
||||
if (this->context() != nullptr && this->context()->isValid()) {
|
||||
for (auto image : images) {
|
||||
if (image.texture != defaultTexture) {
|
||||
if (image.texture->isCreated()) {
|
||||
image.texture->destroy();
|
||||
}
|
||||
delete image.texture;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (defaultTexture != nullptr) {
|
||||
defaultTexture->destroy();
|
||||
delete defaultTexture;
|
||||
if (defaultTexture != nullptr) {
|
||||
if (defaultTexture->isCreated()) {
|
||||
defaultTexture->destroy();
|
||||
}
|
||||
delete defaultTexture;
|
||||
}
|
||||
}
|
||||
|
||||
doneCurrent();
|
||||
|
Loading…
x
Reference in New Issue
Block a user