Fix dispatch issue with ScriptIntrinsic.

bug 10427951

Change-Id: I5bd1a6b4970ae10779920bc64c78e6951e9abdec
diff --git a/cpp/rsCppInternal.h b/cpp/rsCppInternal.h
index 56ed5a3..3f1e130 100644
--- a/cpp/rsCppInternal.h
+++ b/cpp/rsCppInternal.h
@@ -22,4 +22,7 @@
         dispatch;                               \
     }
 
+#define createDispatch(rs, dispatch) \
+    rs->getError() == RS_SUCCESS ? dispatch : NULL
+
 #endif