mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 929506 - fix context bug in BasicTextureImage. r=bjacob
This commit is contained in:
parent
9b7045644c
commit
0b72fc8329
@ -73,9 +73,8 @@ BasicTextureImage::~BasicTextureImage()
|
||||
// if we don't have a context (either real or shared),
|
||||
// then they went away when the contex was deleted, because it
|
||||
// was the only one that had access to it.
|
||||
if (ctx && !ctx->IsDestroyed()) {
|
||||
mGLContext->MakeCurrent();
|
||||
mGLContext->fDeleteTextures(1, &mTexture);
|
||||
if (ctx && ctx->MakeCurrent()) {
|
||||
ctx->fDeleteTextures(1, &mTexture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -699,7 +698,9 @@ CreateBasicTextureImage(GLContext* aGL,
|
||||
TextureImage::ImageFormat aImageFormat)
|
||||
{
|
||||
bool useNearestFilter = aFlags & TextureImage::UseNearestFilter;
|
||||
aGL->MakeCurrent();
|
||||
if (!aGL->MakeCurrent()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GLuint texture = 0;
|
||||
aGL->fGenTextures(1, &texture);
|
||||
|
Loading…
Reference in New Issue
Block a user