Projet

Général

Profil

0010-python-check-if-hashtable-is-NULL-before-deallocatio.patch

Benjamin Dauvergne, 20 juin 2020 12:44

Télécharger (1000 octets)

Voir les différences:

Subject: [PATCH 10/21] python: check if hashtable is NULL before deallocatio
 (#44287)n

 bindings/python/lang.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bindings/python/lang.py
91 91
            k_type = key_type(type)
92 92
            v_type = value_type(type)
93 93
            if is_cstring(el_type) or (is_cstring(k_type) and is_cstring(v_type)):
94
                print_('    g_hash_table_destroy(%s);' % name, file=fd)
94
                print_('    if (%s) { g_hash_table_destroy(%s); }' % (name, name), file=fd)
95 95
            else:
96 96
                raise Exception('Unsupported free value of type GHashTable: %s' % type)
97 97
        elif is_object(type):
98
-