diff options
author | Jason Sams <jsams@google.com> | 2015-03-18 18:28:06 -0700 |
---|---|---|
committer | Jason Sams <jsams@google.com> | 2015-03-18 18:28:06 -0700 |
commit | 4efe3d38ee1d7b76c93a47ce6218b1f708fd4d9a (patch) | |
tree | c5bd8813b46f328f59c56793548efc0f49cb970f /rsScriptC.cpp | |
parent | c3851d58e6f0a97a3f5239d78515acd2be47b507 (diff) | |
download | rs-4efe3d38ee1d7b76c93a47ce6218b1f708fd4d9a.tar.gz |
Add fatal error check
Prevent launching additional commands if the process is dying
This increases the chance the developer will get the error message
before we segfault somewhere.
Change-Id: I575906b22364c0d03859140570ca29bf8f336c01
Diffstat (limited to 'rsScriptC.cpp')
-rw-r--r-- | rsScriptC.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rsScriptC.cpp b/rsScriptC.cpp index 4b204d38..4d791f79 100644 --- a/rsScriptC.cpp +++ b/rsScriptC.cpp @@ -204,6 +204,7 @@ void ScriptC::runForEach(Context *rsc, } ATRACE_NAME(String); (void)String; + if (mRSC->hadFatalError()) return; Context::PushState ps(rsc); @@ -235,6 +236,8 @@ void ScriptC::Invoke(Context *rsc, uint32_t slot, const void *data, size_t len) rsc->setError(RS_ERROR_BAD_SCRIPT, "Calling invoke on bad script"); return; } + if (mRSC->hadFatalError()) return; + setupScript(rsc); if (rsc->props.mLogScripts) { |