Add Java exceptions to catch RS calls with no context or no surface.
diff --git a/graphics/java/android/renderscript/ProgramVertex.java b/graphics/java/android/renderscript/ProgramVertex.java
index ddb23ac..ba97d5b 100644
--- a/graphics/java/android/renderscript/ProgramVertex.java
+++ b/graphics/java/android/renderscript/ProgramVertex.java
@@ -34,6 +34,7 @@
}
public void bindAllocation(MatrixAllocation va) {
+ mRS.validate();
mRS.nProgramVertexBindAllocation(mID, va.mAlloc.mID);
}
@@ -88,6 +89,7 @@
}
public ProgramVertex create() {
+ mRS.validate();
return internalCreate(mRS, this);
}
}