diff options
author | Jason Sams <rjsams@android.com> | 2011-07-13 16:43:27 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-07-13 16:43:27 -0700 |
commit | b328269531691a122a48b375676d1ec70b1e705f (patch) | |
tree | 033f270d0fc3e977d6102aca9420fca7f12093d3 | |
parent | b6e5e7a740bf595a1a5d32b28549e5d579a04ee3 (diff) | |
parent | fb06b7a5510e4c6f6c4b3cd51cca22493cd258ca (diff) | |
download | frameworks_base-b328269531691a122a48b375676d1ec70b1e705f.zip frameworks_base-b328269531691a122a48b375676d1ec70b1e705f.tar.gz frameworks_base-b328269531691a122a48b375676d1ec70b1e705f.tar.bz2 |
Merge "Fix native crash when GL driver fails to initialize."
-rw-r--r-- | libs/rs/rsContext.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index 44e9d89..8798612 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -693,7 +693,9 @@ RsContext rsContextCreateGL(RsDevice vdev, uint32_t version, LOGV("rsContextCreateGL %p", vdev); Device * dev = static_cast<Device *>(vdev); Context *rsc = Context::createContext(dev, &sc); - rsc->setDPI(dpi); + if (rsc) { + rsc->setDPI(dpi); + } LOGV("rsContextCreateGL ret %p ", rsc); return rsc; } |