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;
 }