1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

Follow-up fix to r348811 for null Errors (which is the case for end iterators)

Not sure how I missed that in my testing, but obvious enough - this
causes segfaults when attempting to dereference the Error in end
iterators.

llvm-svn: 348814
This commit is contained in:
David Blaikie 2018-12-11 00:17:36 +00:00
parent ef6e5dc833
commit 982c1b4855

View File

@ -676,9 +676,9 @@ public:
return *this;
}
bool operator==(Elf_Note_Iterator_Impl Other) const {
if (!Nhdr)
if (!Nhdr && Other.Err)
(void)(bool)(*Other.Err);
if (!Other.Nhdr)
if (!Other.Nhdr && Err)
(void)(bool)(*Err);
return Nhdr == Other.Nhdr;
}