[gnome-shell] st-entry: don't assume a cursor func has been set
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st-entry: don't assume a cursor func has been set
- Date: Wed, 14 Jun 2017 21:00:22 +0000 (UTC)
commit a256a3577952734cd3154c842cb627fe043e1155
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Jun 6 14:27:18 2017 -0700
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 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/st/st-entry.c b/src/st/st-entry.c
index 152f3eb..d81463d 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]