parent
974c054bc9
commit
dbdcb85346
@ -9,7 +9,7 @@
|
||||
#define BLOCKENTITY_PROTODEF(classname) \
|
||||
virtual bool IsA(const char * a_ClassName) const override \
|
||||
{ \
|
||||
return ((strcmp(a_ClassName, #classname) == 0) || super::IsA(a_ClassName)); \
|
||||
return ((a_ClassName != nullptr) && ((strcmp(a_ClassName, #classname) == 0) || super::IsA(a_ClassName))); \
|
||||
} \
|
||||
virtual const char * GetClass(void) const override \
|
||||
{ \
|
||||
|
@ -2013,7 +2013,7 @@ void cEntity::Detach(void)
|
||||
|
||||
bool cEntity::IsA(const char * a_ClassName) const
|
||||
{
|
||||
return (strcmp(a_ClassName, "cEntity") == 0);
|
||||
return ((a_ClassName != nullptr) && (strcmp(a_ClassName, "cEntity") == 0));
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define CLASS_PROTODEF(classname) \
|
||||
virtual bool IsA(const char * a_ClassName) const override\
|
||||
{ \
|
||||
return ((strcmp(a_ClassName, #classname) == 0) || super::IsA(a_ClassName)); \
|
||||
return ((a_ClassName != nullptr) && ((strcmp(a_ClassName, #classname) == 0) || super::IsA(a_ClassName))); \
|
||||
} \
|
||||
virtual const char * GetClass(void) const override \
|
||||
{ \
|
||||
|
Loading…
Reference in New Issue
Block a user