diff options
author | Tim Murray <timmurray@google.com> | 2013-08-29 11:07:17 -0700 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2013-09-03 11:41:56 -0700 |
commit | fa77db83d3e36d6aa23622cec5bdcb5e373f0a3b (patch) | |
tree | fd5274a7d95660f0c849a7a4f7fa57644e65c2ad /cpp | |
parent | 927edc2b99b73d1f236320663ed7ed4cfeee2f91 (diff) | |
download | rs-fa77db83d3e36d6aa23622cec5bdcb5e373f0a3b.tar.gz |
Fix dispatch issue with ScriptIntrinsic.
bug 10427951
Change-Id: I5bd1a6b4970ae10779920bc64c78e6951e9abdec
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/ScriptIntrinsics.cpp | 3 | ||||
-rw-r--r-- | cpp/rsCppInternal.h | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/cpp/ScriptIntrinsics.cpp b/cpp/ScriptIntrinsics.cpp index 35f2a31b..98490c54 100644 --- a/cpp/ScriptIntrinsics.cpp +++ b/cpp/ScriptIntrinsics.cpp @@ -17,13 +17,14 @@ #include <malloc.h> #include "RenderScript.h" +#include "rsCppInternal.h" using namespace android; using namespace RSC; ScriptIntrinsic::ScriptIntrinsic(sp<RS> rs, int id, sp<const Element> e) : Script(NULL, rs) { - mID = RS::dispatch->ScriptIntrinsicCreate(rs->getContext(), id, e->getID()); + mID = createDispatch(rs, RS::dispatch->ScriptIntrinsicCreate(rs->getContext(), id, e->getID())); mElement = e; } diff --git a/cpp/rsCppInternal.h b/cpp/rsCppInternal.h index 56ed5a31..3f1e1306 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 |