Commit 08ea44f5 authored by Milan Crha's avatar Milan Crha

Fix some maybe uninitialized variable usages

Shown with -O3 in CFLAGS.
parent 00a3a55a
......@@ -1549,7 +1549,8 @@ insert_unichar (ENameSelectorEntry *name_selector_entry,
/* We do this so we can avoid disturbing destinations with completed contacts
* either before or after the destination being inserted. */
get_range_at_position (text, *pos, &start_pos, &end_pos);
if (!get_range_at_position (text, *pos, &start_pos, &end_pos))
return 0;
if (*pos <= start_pos)
at_start = TRUE;
if (*pos >= end_pos)
......@@ -2937,8 +2938,8 @@ popup_activate_inline_expand (ENameSelectorEntry *name_selector_entry,
text = gtk_entry_get_text (GTK_ENTRY (name_selector_entry));
get_range_at_position (text, position, &start, &end);
gtk_editable_delete_text (GTK_EDITABLE (name_selector_entry), start, end);
if (get_range_at_position (text, position, &start, &end))
gtk_editable_delete_text (GTK_EDITABLE (name_selector_entry), start, end);
gtk_editable_insert_text (GTK_EDITABLE (name_selector_entry), sanitized_text->str, -1, &start);
g_string_free (sanitized_text, TRUE);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment