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
This commit is contained in:
robertphillips@google.com 2012-11-15 16:33:31 +00:00
parent 82b4f32fbe
commit fe830a4641

View File

@ -840,7 +840,12 @@ void SkDebuggerGUI::loadPicture(const SkString& fileName) {
// 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.