Fix debugger crash when SK_PICTURE_PROFILING_STUBS isn't defined
https://codereview.appspot.com/6850060/
git-svn-id: http://skia.googlecode.com/svn/trunk@6433 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index 6ad4805..994bb3f 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -840,7 +840,12 @@
// Will this automatically clear out due to nature of refcnt?
SkTDArray<SkString*>* commands = fDebugger.getDrawCommands();
- SkASSERT(commands->count() == fOffsets.count());
+ // If SkPicturePlayback is compiled w/o SK_PICTURE_PROFILING_STUBS
+ // the offset count will always be zero
+ SkASSERT(0 == fOffsets.count() || commands->count() == fOffsets.count());
+ if (0 == fOffsets.count()) {
+ fActionProfile.setDisabled(true);
+ }
/* fDebugCanvas is reinitialized every load picture. Need it to retain value
* of the visibility filter.