]> git.0d.be Git - empathy.git/commit
[empathy_builder_get_file] NULL out passed GObj ptrs if GtkBuilder file broken
authorDavyd Madeley <davyd@madeley.id.au>
Tue, 1 Sep 2009 04:11:47 +0000 (14:11 +1000)
committerDavyd Madeley <davyd@madeley.id.au>
Tue, 1 Sep 2009 04:11:47 +0000 (14:11 +1000)
commit577518e4c14b563c32d8486592f2c670acb9b857
tree9d4134975a39be68f0b826dfa163c2744ee76a1d
parent08c465a2d1b55d42834d338c562e7fde42273d0f
[empathy_builder_get_file] NULL out passed GObj ptrs if GtkBuilder file broken

If the GtkBuilder file passed to empathy_builder_get_file is broken, it
returns NULL, but doesn't touch the contents of any pointers passed to retrieve
GObjects. In several places we start using these pointers without checking
whether the file was actually setup, which causes Empathy to crash.

Ideally callers of empathy_builder_get_file() should check whether or not
the function returned correctly before using any of the passed pointers, but
in case they don't, make sure we're not passing pointers to random memory.
libempathy-gtk/empathy-ui-utils.c