From a256a3577952734cd3154c842cb627fe043e1155 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Tue, 6 Jun 2017 14:27:18 -0700 Subject: [PATCH] st-entry: don't assume a cursor func has been set That won't be the case when called from tests. https://bugzilla.gnome.org/show_bug.cgi?id=783484 --- src/st/st-entry.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/st/st-entry.c b/src/st/st-entry.c index 152f3eb8e..d81463d5e 100644 --- a/src/st/st-entry.c +++ b/src/st/st-entry.c @@ -739,7 +739,8 @@ static void st_entry_set_cursor (StEntry *entry, gboolean use_ibeam) { - cursor_func (entry, use_ibeam, cursor_func_data); + if (cursor_func) + cursor_func (entry, use_ibeam, cursor_func_data); ((StEntryPrivate *)ST_ENTRY_PRIV (entry))->has_ibeam = use_ibeam; }