commit | 9544f76195de22f655fd7a1894934667e7e55f6a | [log] [tgz] |
---|---|---|
author | Jason Sams <[email protected]> | Wed Jul 13 16:09:42 2011 -0700 |
committer | Jason Sams <[email protected]> | Wed Jul 13 16:09:42 2011 -0700 |
tree | 6f914faddad9fe410e30a505831332a1f14762ce | |
parent | 35e429ebf817130d8590d11d441a77aa697bd7d4 [diff] [blame] |
Fix native crash when GL driver fails to initialize. Change-Id: I85714de9029285027dc75fb3b62076be41a4c985
diff --git a/rsContext.cpp b/rsContext.cpp index 44e9d89..8798612 100644 --- a/rsContext.cpp +++ b/rsContext.cpp
@@ -693,7 +693,9 @@ 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; }