mirror of
https://github.com/utmapp/angle.git
synced 2026-12-01 22:13:25 -10:00
Exit on nullptr returned from decompress callback.
Decompression failures appear to happen (very) occasionally, resulting in a weird stack trace later down the road. Bug: None Change-Id: I12780f462c7d1a141d0841e1e07acb2d282077e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3970768 Auto-Submit: Roman Lavrov <[email protected]> Commit-Queue: Amirali Abdolrashidi <[email protected]> Reviewed-by: Amirali Abdolrashidi <[email protected]> Reviewed-by: Cody Northrop <[email protected]>
This commit is contained in:
1 parent
9b9d8032c1
commit
6bef063034
1 file changed
+5
@@ -67,6 +67,11 @@ void LoadBinaryData(const char *fileName)
|
||||
std::vector<uint8_t> compressedData(size);
|
||||
(void)fread(compressedData.data(), 1, size, fp);
|
||||
gBinaryData = gDecompressCallback(compressedData);
|
||||
if (gBinaryData == nullptr)
|
||||
{
|
||||
// Error already printed by the callback
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user