fix dm crash
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1149243006
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index 99725a5..2a2b5b6 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -10,7 +10,7 @@
// We will use the reordering buffer, unless we have NVPR.
// TODO move NVPR to batch so we can reorder
static inline bool allow_reordering(const GrCaps* caps) {
- return !caps->shaderCaps()->pathRenderingSupport();
+ return caps && caps->shaderCaps() && !caps->shaderCaps()->pathRenderingSupport();
}
GrInOrderDrawBuffer::GrInOrderDrawBuffer(GrContext* context)