summaryrefslogtreecommitdiffstats
path: root/libs/rs
diff options
context:
space:
mode:
Diffstat (limited to 'libs/rs')
-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 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;
}