Merge "fastboot: Don't give parsing error for unsupported 'getvar erase-block-size'."
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index c3b1bfb..df755aa 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -1354,7 +1354,7 @@
static unsigned fb_get_flash_block_size(Transport* transport, std::string name) {
std::string sizeString;
- if (!fb_getvar(transport, name.c_str(), &sizeString)) {
+ if (!fb_getvar(transport, name.c_str(), &sizeString) || sizeString.empty()) {
/* This device does not report flash block sizes, so return 0 */
return 0;
}