diff options
author | Alex Sakhartchouk <alexst@google.com> | 2011-08-05 15:27:25 -0700 |
---|---|---|
committer | Alex Sakhartchouk <alexst@google.com> | 2011-08-05 15:27:25 -0700 |
commit | bbc41c034b0b851287c24c3a51a17586d9960026 (patch) | |
tree | fa4f457e4445f2e7a1e4f87d348d5d8ed1c9d55e /libs/rs/driver/rsdProgram.cpp | |
parent | 163efc028544db685c8b6244deffcca28a91e3ba (diff) | |
download | frameworks_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.cpp | 3 |
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); |