summaryrefslogtreecommitdiffstats
path: root/libs/rs/driver/rsdProgram.cpp
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2011-08-05 15:27:25 -0700
committerAlex Sakhartchouk <alexst@google.com>2011-08-05 15:27:25 -0700
commitbbc41c034b0b851287c24c3a51a17586d9960026 (patch)
treefa4f457e4445f2e7a1e4f87d348d5d8ed1c9d55e /libs/rs/driver/rsdProgram.cpp
parent163efc028544db685c8b6244deffcca28a91e3ba (diff)
downloadframeworks_base-bbc41c034b0b851287c24c3a51a17586d9960026.zip
frameworks_base-bbc41c034b0b851287c24c3a51a17586d9960026.tar.gz
frameworks_base-bbc41c034b0b851287c24c3a51a17586d9960026.tar.bz2
Fixing rs crash when no texture is bound.
Change-Id: I2c15106f50de995c63691f27e2c4d89dbffc758e
Diffstat (limited to 'libs/rs/driver/rsdProgram.cpp')
-rw-r--r--libs/rs/driver/rsdProgram.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/rs/driver/rsdProgram.cpp b/libs/rs/driver/rsdProgram.cpp
index 39b3805..27a6663 100644
--- a/libs/rs/driver/rsdProgram.cpp
+++ b/libs/rs/driver/rsdProgram.cpp
@@ -44,6 +44,9 @@ bool rsdProgramVertexInit(const Context *rsc, const ProgramVertex *pv,
static void SyncProgramConstants(const Context *rsc, const Program *p) {
for (uint32_t ct=0; ct < p->mHal.state.texturesCount; ct++) {
const Allocation *a = p->mHal.state.textures[ct].get();
+ if (!a) {
+ continue;
+ }
DrvAllocation *drvAlloc = (DrvAllocation *)a->mHal.drv;
if (drvAlloc->uploadDeferred) {
rsdAllocationSyncAll(rsc, a, RS_ALLOCATION_USAGE_SCRIPT);