summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/rs/rsContext.cpp')
-rw-r--r--libs/rs/rsContext.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index 4f469e1..447a7ff 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -689,7 +689,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;
}