diff options
author | Olly Betts <olly@survex.com> | 2021-03-29 17:45:03 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2021-03-29 17:45:03 +1300 |
commit | 5156ad4f7bc8d39cced93ebe59f4165c5da016c9 (patch) | |
tree | 068848e7fd5079757afe8a0fe96fb97ad7826815 /Source | |
parent | 979d48b0b486267487aa9ff5ff64227659eca59c (diff) | |
download | swig-5156ad4f7bc8d39cced93ebe59f4165c5da016c9.tar.gz |
Remove unnecessary NULL check
SWIG_remove() calls either free() or delete, both of which handle
a NULL pointer.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Modules/php.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index c8c02dc7a..bb0df5850 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -135,7 +135,7 @@ static void print_creation_free_wrapper(int item_index) { Printf(s_header, " obj = php_fetch_object(object);\n\n"); if (need_free) { - Printf(s_header, " if(obj->ptr && obj->newobject)\n"); + Printf(s_header, " if(obj->newobject)\n"); Printf(s_header, " SWIG_remove((%s *)obj->ptr);\n",class_type); } |