diff options
author | Johan Dahlin <jdahlin@async.com.br> | 2008-05-31 14:14:07 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2008-05-31 14:14:07 +0000 |
commit | c7bc4f4e6263db8a2914692dc75ff7b695a16dc3 (patch) | |
tree | df28eeaf6307057a0a1a292baadcab62a8584180 | |
parent | 7c74fa362e8750ed6acdb066a2d7d1dce44f6169 (diff) | |
download | gobject-introspection-c7bc4f4e6263db8a2914692dc75ff7b695a16dc3.tar.gz |
Prevent a crash when symbol->indent is NULL.
2008-05-31 Johan Dahlin <jdahlin@async.com.br>
* giscanner/giscannermodule.c (symbol_get_ident): Prevent
a crash when symbol->indent is NULL.
svn path=/trunk/; revision=276
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | giscanner/giscannermodule.c | 7 |
2 files changed, 10 insertions, 0 deletions
@@ -1,5 +1,8 @@ 2008-05-31 Johan Dahlin <jdahlin@async.com.br> + * giscanner/giscannermodule.c (symbol_get_ident): Prevent + a crash when symbol->indent is NULL. + * giscanner/sourcescanner.py (ctype_name): Add ctype_name, a function to convert a CTYPE symbol to a string diff --git a/giscanner/giscannermodule.c b/giscanner/giscannermodule.c index df258404..3d3e7d95 100644 --- a/giscanner/giscannermodule.c +++ b/giscanner/giscannermodule.c @@ -175,6 +175,13 @@ static PyObject * symbol_get_ident (PyGISourceSymbol *self, void *context) { + + if (!self->symbol->ident) + { + Py_INCREF(Py_None); + return Py_None; + } + return PyString_FromString (self->symbol->ident); } |