diff options
Diffstat (limited to 'graphics/java/android/renderscript/ProgramVertex.java')
-rw-r--r-- | graphics/java/android/renderscript/ProgramVertex.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/graphics/java/android/renderscript/ProgramVertex.java b/graphics/java/android/renderscript/ProgramVertex.java index c4f7759..74c005f 100644 --- a/graphics/java/android/renderscript/ProgramVertex.java +++ b/graphics/java/android/renderscript/ProgramVertex.java @@ -34,8 +34,11 @@ public class ProgramVertex extends BaseObj { } public void destroy() { + if(mDestroyed) { + throw new IllegalStateException("Object already destroyed."); + } + mDestroyed = true; mRS.nProgramVertexDestroy(mID); - mID = 0; } public void bindAllocation(MatrixAllocation va) { |