diff --git a/src/build/libbe/storage/AppFileInfo.cpp b/src/build/libbe/storage/AppFileInfo.cpp index 7f7af81a51..c5823333af 100644 --- a/src/build/libbe/storage/AppFileInfo.cpp +++ b/src/build/libbe/storage/AppFileInfo.cpp @@ -1118,7 +1118,7 @@ BAppFileInfo::_ReadData(const char *name, int32 id, type_code type, error = B_ERROR; } - } else + } else if (!foundData) error = B_BAD_VALUE; // return the allocated buffer, or free it on error