Mercurial > pidgin
changeset 18554:ab58b55f38b0
Do a NULL-check to prevent a crash.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 16 Jul 2007 23:59:58 +0000 |
parents | 9816af55f45c |
children | bb71094d7a62 5e1412f4e67a 57fc767ceb7a |
files | finch/libgnt/gntwm.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/libgnt/gntwm.c Mon Jul 16 23:50:41 2007 +0000 +++ b/finch/libgnt/gntwm.c Mon Jul 16 23:59:58 2007 +0000 @@ -914,7 +914,7 @@ len = wcstombs(NULL, wide, 0) + 1; string = g_new0(char, len); wcstombs(string, wide, len); - ret = gnt_util_onscreen_width(string, NULL); + ret = string ? gnt_util_onscreen_width(string, NULL) : 1; g_free(string); return ret; }