diff options
author | Tim Murray <timmurray@google.com> | 2012-10-31 16:03:16 -0700 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2012-11-05 16:34:59 -0800 |
commit | 84bf2b877024aaa154b66e0f2338d54bdabd855a (patch) | |
tree | 64fcf3429697d1d609182a7ae769eb3d89e1f272 /rsScriptC.cpp | |
parent | c36a74dfcf0c1a9af6b6411aa80f7be31694425c (diff) | |
download | rs-84bf2b877024aaa154b66e0f2338d54bdabd855a.tar.gz |
Move to smart pointers for refcounting RS contexts
Change-Id: I0dc6adc4e02c7427a4234c549d3555a501fe5f90
Diffstat (limited to 'rsScriptC.cpp')
-rw-r--r-- | rsScriptC.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rsScriptC.cpp b/rsScriptC.cpp index b2910455..18e4af21 100644 --- a/rsScriptC.cpp +++ b/rsScriptC.cpp @@ -250,8 +250,14 @@ bool ScriptC::runCompiler(Context *rsc, bitcodeLen = BT->getTranslatedBitcodeSize(); #endif + if (!cacheDir) { + // MUST BE FIXED BEFORE ANYTHING USING C++ API IS RELEASED + cacheDir = getenv("EXTERNAL_STORAGE"); + ALOGV("Cache dir changed to %s", cacheDir); + } + // ensure that cache dir exists - if (!createCacheDir(cacheDir)) { + if (cacheDir && !createCacheDir(cacheDir)) { return false; } |