From 2cb761e3ddb9d68ab430013e9cd15ecaab9fbc62 Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Fri, 15 Aug 2014 13:59:02 -0700 Subject: Fix assumption about DynamicRefTable in aapt Packages without any resources should not expect to have a DynamicRefTable. Bug:16895517 Bug:17056720 Change-Id: Id006f6bdbf08f30505f6ba5982bc9d1b09db0f0a --- tools/aapt/Command.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'tools/aapt/Command.cpp') diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index 41102fe7491d..c74a3730bcba 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -764,12 +764,9 @@ int doDump(Bundle* bundle) return 1; } + // The dynamicRefTable can be null if there are no resources for this asset cookie. + // This fine. const DynamicRefTable* dynamicRefTable = res.getDynamicRefTableForCookie(assetsCookie); - if (dynamicRefTable == NULL) { - fprintf(stderr, "ERROR: failed to find dynamic reference table for asset cookie %d\n", - assetsCookie); - return 1; - } Asset* asset = NULL; -- cgit v1.2.3-59-g8ed1b