Chromium Code Reviews| Index: include/core/SkTemplates.h |
| =================================================================== |
| --- include/core/SkTemplates.h (revision 10052) |
| +++ include/core/SkTemplates.h (working copy) |
| @@ -250,7 +250,9 @@ |
| } |
| if (fCount != count) { |
| - if (count > N) { |
| + if (fCount > N) { |
| + // 'fArray' was allocated last time so free it now |
| + SkASSERT((T*) fStorage != fArray); |
| sk_free(fArray); |
| } |
| @@ -260,7 +262,6 @@ |
| fArray = (T*) fStorage; |
| } else { |
| fArray = NULL; |
| - return; |
| } |
| fCount = count; |