Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1308 from achambers16/fix-RawDataOutput-bad-access

Fix exc-bad-access if GPUImageRawDataOutput is initialized during render
  • Loading branch information...
commit 0862252e52cd86a893d5ea85d0b98ef6b6a0ee5f 2 parents 2941de1 + 3c72968
@BradLarson authored
Showing with 3 additions and 6 deletions.
  1. +3 −6 framework/Source/GPUImageRawDataOutput.m
View
9 framework/Source/GPUImageRawDataOutput.m
@@ -85,12 +85,6 @@ - (id)initWithImageSize:(CGSize)newImageSize resultsInBGRAFormat:(BOOL)resultsIn
dataTextureCoordinateAttribute = [dataProgram attributeIndex:@"inputTextureCoordinate"];
dataInputTextureUniform = [dataProgram uniformIndex:@"inputImageTexture"];
- // REFACTOR: Wrap this in a block for the image processing queue
- [GPUImageContext setActiveShaderProgram:dataProgram];
-
- glEnableVertexAttribArray(dataPositionAttribute);
- glEnableVertexAttribArray(dataTextureCoordinateAttribute);
-
return self;
}
@@ -305,6 +299,9 @@ - (void)renderAtInternalSize;
glVertexAttribPointer(dataPositionAttribute, 2, GL_FLOAT, 0, 0, squareVertices);
glVertexAttribPointer(dataTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates);
+ glEnableVertexAttribArray(dataPositionAttribute);
+ glEnableVertexAttribArray(dataTextureCoordinateAttribute);
+
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
Please sign in to comment.
Something went wrong with that request. Please try again.