aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/text
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-12-11 01:50:14 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-12-11 01:50:14 +0800
commit5f447101ddea3fffcfec86780ba912998842a8fa (patch)
treeec36985f6b5904bf9c9c67a709103b3df3af5ed9 /widgets/text
parentedf6873ade3d455f16be169a88c54819f32cea9c (diff)
downloadgsoc2013-evolution-5f447101ddea3fffcfec86780ba912998842a8fa.tar.gz
gsoc2013-evolution-5f447101ddea3fffcfec86780ba912998842a8fa.tar.zst
gsoc2013-evolution-5f447101ddea3fffcfec86780ba912998842a8fa.zip
Don't crash if the text string is NULL. (text_draw_with_objects): Don't
2001-12-10 Jon Trowbridge <trow@ximian.com> * gal/e-text/e-text.c (text_width_with_objects): Don't crash if the text string is NULL. (text_draw_with_objects): Don't crash if the text string is NULL. (Fixes #16359) svn path=/trunk/; revision=14954
Diffstat (limited to 'widgets/text')
-rw-r--r--widgets/text/e-text.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 8145ebfab6..4fc8437732 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -897,7 +897,7 @@ text_width_with_objects (ETextModel *model,
EFont *font, EFontStyle style,
const gchar *text, gint numbytes)
{
- return e_font_utf8_text_width (font, style, text, numbytes);
+ return text && *text ? e_font_utf8_text_width (font, style, text, numbytes) : 0;
}
static void
@@ -909,6 +909,9 @@ text_draw_with_objects (ETextModel *model,
const gchar *text, gint numbytes)
{
const gchar *c;
+
+ if (text == NULL)
+ return;
while (*text && numbytes > 0) {
gint obj_num = -1;
electron6/files/ini-1.3.8&id=c375ed37df92a6e58eaf54cf831525f3a49c9629'>- Teach the Haskell Cabal ports to use the new options frameworkpgj2012-08-031-0/+1 * - Update to 0.0.1.1pgj2012-06-043-7/+9 * - Update to 0.0.1.0pgj2012-02-132-4/+3 * Bump PORTREVISION of all ports dependent on lang/ghc as duringashish2011-05-261-0/+1 * - Please welcome GHC 7.0.3ashish2011-05-093-20/+5 * - Add DIST_SUBDIR for Haskell Cabal ports (with default of "cabal")pgj2010-08-081-3/+3 * Rename the following Haskell ports to bring them in sync with thepgj2010-05-252-2/+0 * Introduce a new (and hopefully better) ports infrastructure for Haskell Cabalpgj2010-05-132-70/+13 * - Update to 0.0.0.8pgj2009-12-162-7/+6 * - Update HsColour to 1.15pgj2009-12-071-1/+2 * - Update GHC and Haskell ports to 6.10.4 (for both i386 and amd64), bumppgj2009-09-024-36/+60 * - Update to 0.0.0.5pgj2009-03-302-4/+4 * - Update to 0.0.0.4pgj2009-03-073-4/+5