Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(997)

Unified Diff: core/src/fpdfapi/fpdf_font/ttgsubtable.h

Issue 1529553003: Merge to XFA: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fpdfapi/fpdf_font/ttgsubtable.h
diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.h b/core/src/fpdfapi/fpdf_font/ttgsubtable.h
index e3c996565460789a204d6844e03785a0f8c03fdf..605d25fd579dd1adf3c92f0657a32663df870f4d 100644
--- a/core/src/fpdfapi/fpdf_font/ttgsubtable.h
+++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.h
@@ -277,10 +277,9 @@ class CFX_CTTGSUBTable {
TLookup()
: LookupType(0), LookupFlag(0), SubTableCount(0), SubTable(NULL) {}
~TLookup() {
- if (SubTableCount > 0 && SubTable != NULL) {
- for (int i = 0; i < SubTableCount; i++) {
+ if (SubTable) {
+ for (int i = 0; i < SubTableCount; ++i)
delete SubTable[i];
- }
delete[] SubTable;
}
}

Powered by Google App Engine
This is Rietveld 408576698