mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 704114 - Fix missing texture crash [r=pcwalton]
During startup there is a race condition where the LayerRenderer might request a paint of the root layer before the root layer has successfully generated a texture. This might happen if the transaction lock is already held when the root layer attempts to generate the texture. Fix by inserting a null guard that aborts the paint if the texture has not been generated.
This commit is contained in:
parent
3dda672274
commit
77f46817f9
@ -96,7 +96,9 @@ public abstract class TileLayer extends Layer {
|
||||
|
||||
@Override
|
||||
protected void onDraw(GL10 gl) {
|
||||
if (mImage == null)
|
||||
// mTextureIDs may be null here during startup if Layer.java's draw method
|
||||
// failed to acquire the transaction lock and call performUpdates.
|
||||
if (mImage == null || mTextureIDs == null)
|
||||
return;
|
||||
|
||||
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
|
||||
|
Loading…
Reference in New Issue
Block a user