0010-python-check-if-hashtable-is-NULL-before-deallocatio.patch
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 |
- |