Minor bug fixes and add glError check.
diff --git a/rsContext.cpp b/rsContext.cpp
index 33ed0ca..5127717 100644
--- a/rsContext.cpp
+++ b/rsContext.cpp
@@ -145,6 +145,12 @@
     }
     mStateFragmentStore.mLast.clear();
     bool ret = runScript(mRootScript.get(), 0);
+
+    GLenum err = glGetError();
+    if (err != GL_NO_ERROR) {
+        LOGE("Pending GL Error, 0x%x", err);
+    }
+
     return ret;
 }