aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-03-29 14:30:25 -0500
committerTed Gould <ted@gould.cx>2011-03-29 14:30:25 -0500
commit1c91ca459c0b45823738c4c42fc95e5eb0c9a84a (patch)
treee4268f86ee2cfc4de2e78b1eeac61fbb43dddc1c /src
parent9f61fa02077c8a0ec1f0477a3b284d828d7bbff8 (diff)
parent37106c9e4c1d59285fdc0185ea2f55891d19c4cf (diff)
downloadayatana-indicator-datetime-1c91ca459c0b45823738c4c42fc95e5eb0c9a84a.tar.gz
ayatana-indicator-datetime-1c91ca459c0b45823738c4c42fc95e5eb0c9a84a.tar.bz2
ayatana-indicator-datetime-1c91ca459c0b45823738c4c42fc95e5eb0c9a84a.zip
Protect against not having an entry
Diffstat (limited to 'src')
-rw-r--r--src/timezone-completion.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/timezone-completion.c b/src/timezone-completion.c
index ddeef29..ad04d0c 100644
--- a/src/timezone-completion.c
+++ b/src/timezone-completion.c
@@ -81,12 +81,15 @@ save_and_use_model (TimezoneCompletion * completion, GtkTreeModel * model)
gtk_entry_completion_set_match_func (GTK_ENTRY_COMPLETION (completion), match_func, NULL, NULL);
gtk_entry_completion_set_model (GTK_ENTRY_COMPLETION (completion), model);
- gtk_entry_completion_complete (GTK_ENTRY_COMPLETION (completion));
- /* By this time, the changed signal has come and gone. We didn't give a
- model to use, so no popup appeared for user. Poke the entry again to show
- popup in 300ms. */
- g_signal_emit_by_name (priv->entry, "changed");
+ if (priv->entry != NULL) {
+ gtk_entry_completion_complete (GTK_ENTRY_COMPLETION (completion));
+
+ /* By this time, the changed signal has come and gone. We didn't give a
+ model to use, so no popup appeared for user. Poke the entry again to show
+ popup in 300ms. */
+ g_signal_emit_by_name (priv->entry, "changed");
+ }
}
static gint