diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/inspircd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index 7d6e3803e..726d77533 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -42,7 +42,7 @@ */ #define IS_SINGLE(x,y) ( (*x == y) && (*(x+1) == 0) ) -#define DELETE(x) { log(DEBUG,"%s:%d: delete()",__FILE__,__LINE__); delete x; } +#define DELETE(x) { log(DEBUG,"%s:%d: delete()",__FILE__,__LINE__); if (x) { delete x; x = NULL; } else log(DEBUG,"Attempt to delete NULL pointer!"); } template<typename T> inline std::string ConvToStr(const T &in) { |