mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-04 01:42:09 +00:00
Check for NULL before traversing the isa<> type hierarchy checking with a
NULL-based reference. Note: Encountered this a few times on Tiger + gcc 4.0.1. Might just be a platform-specific compiler issue, but it's good defensive programming in any case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59890 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7a15273892
commit
bab6436b17
@ -98,7 +98,7 @@ template<class FromCl>
|
||||
struct isa_impl_cl<FromCl*> {
|
||||
template<class ToCl>
|
||||
static bool isa(FromCl *Val) {
|
||||
return isa_impl_cl<FromCl>::template isa<ToCl>(*Val);
|
||||
return (Val != 0 && isa_impl_cl<FromCl>::template isa<ToCl>(*Val));
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user