From: Kenny Root Date: Thu, 18 Feb 2010 16:54:47 +0000 (-0800) Subject: Fix enum reference X-Git-Url: https://git.saurik.com/android/aapt.git/commitdiff_plain/18a923f694a1bce5729f66c1c9a3ffe7c76dc221 Fix enum reference Was using argument that is set default to NULL as a shortcut to an enum's value. Change it to reference to class directly to avoid a null pointer dereference. Change-Id: I16b8ee15af4f095f027113131d574b70768994b0 --- diff --git a/AaptAssets.cpp b/AaptAssets.cpp index 663a33a..dc442aa 100644 --- a/AaptAssets.cpp +++ b/AaptAssets.cpp @@ -938,17 +938,17 @@ bool AaptGroupEntry::getKeysHiddenName(const char* name, uint8_t mask = 0; uint8_t value = 0; if (strcmp(name, kWildcardName) == 0) { - mask = out->MASK_KEYSHIDDEN; - value = out->KEYSHIDDEN_ANY; + mask = ResTable_config::MASK_KEYSHIDDEN; + value = ResTable_config::KEYSHIDDEN_ANY; } else if (strcmp(name, "keysexposed") == 0) { - mask = out->MASK_KEYSHIDDEN; - value = out->KEYSHIDDEN_NO; + mask = ResTable_config::MASK_KEYSHIDDEN; + value = ResTable_config::KEYSHIDDEN_NO; } else if (strcmp(name, "keyshidden") == 0) { - mask = out->MASK_KEYSHIDDEN; - value = out->KEYSHIDDEN_YES; + mask = ResTable_config::MASK_KEYSHIDDEN; + value = ResTable_config::KEYSHIDDEN_YES; } else if (strcmp(name, "keyssoft") == 0) { - mask = out->MASK_KEYSHIDDEN; - value = out->KEYSHIDDEN_SOFT; + mask = ResTable_config::MASK_KEYSHIDDEN; + value = ResTable_config::KEYSHIDDEN_SOFT; } if (mask != 0) {