diff options
Diffstat (limited to 'widgets/e-table/e-cell-text.c')
-rw-r--r-- | widgets/e-table/e-cell-text.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/widgets/e-table/e-cell-text.c b/widgets/e-table/e-cell-text.c index e496a50cb4..d9d8a568db 100644 --- a/widgets/e-table/e-cell-text.c +++ b/widgets/e-table/e-cell-text.c @@ -184,15 +184,12 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable, if (edit_display){ CellEdit *edit = text_view->edit; const char *text = gtk_entry_get_text (edit->entry); - GdkWChar *p, *text_wc; - int text_wc_len; + GdkWChar *p, *text_wc = g_new (GdkWChar, strlen (text) + 1); + int text_wc_len = gdk_mbstowcs (text_wc, text, strlen (text)); const int cursor_pos = GTK_EDITABLE (edit->entry)->current_pos; const int left_len = gdk_text_width_wc (text_view->font, text_wc, cursor_pos); - text_wc = g_new (GdkWChar, strlen (text) + 1); - text_wc_len = gdk_mbstowcs (text_wc, text, strlen (text)); text_wc [text_wc_len] = 0; - /* * Paint */ |