summaryrefslogtreecommitdiff
path: root/tools/aapt/ResourceTable.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2014-11-11 19:36:19 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-11-11 19:36:20 +0000
commit8aa93764ea025b1c20f96b366ae6efb17e4f2d67 (patch)
tree2525ee3874b302413341dd79af08f74b7fd5870b /tools/aapt/ResourceTable.cpp
parent24c16b7e4cdbacedd33347a01ff4944abfc86218 (diff)
parentda44fe0e1f7c177cd65b7c5c80b35ec8fb3bc1c2 (diff)
Merge "Fixing NULL pointer access causing segmentation fault in aapt"
Diffstat (limited to 'tools/aapt/ResourceTable.cpp')
-rw-r--r--tools/aapt/ResourceTable.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index 4cca57fdecb1..0ec1aebb8b40 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -3009,7 +3009,7 @@ status_t ResourceTable::flatten(Bundle* bundle, const sp<const ResourceFilter>&
// We need to write one type chunk for each configuration for
// which we have entries in this type.
- const size_t NC = t->getUniqueConfigs().size();
+ const size_t NC = t != NULL ? t->getUniqueConfigs().size() : 0;
const size_t typeSize = sizeof(ResTable_type) + sizeof(uint32_t)*N;