diff options
author | Thomas White <taw@physics.org> | 2021-02-18 13:09:57 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-02-18 13:09:57 +0100 |
commit | 705b7a94948cc8f0793c24efe00e36d2d2174085 (patch) | |
tree | f6d063054b770bced2bc6d9a1e59ccbb48db9ff2 /src/gui_ambi.c | |
parent | 831574153f9b9a3da24ed91bba323c25d385b1f1 (diff) |
GUI: Avoid passing a few NULLs to GTK
Diffstat (limited to 'src/gui_ambi.c')
-rw-r--r-- | src/gui_ambi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui_ambi.c b/src/gui_ambi.c index d29ce6b0..0535dd99 100644 --- a/src/gui_ambi.c +++ b/src/gui_ambi.c @@ -225,7 +225,9 @@ static GtkWidget *make_ambigator_options(struct ambi_window *win) gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(win->use_operator), FALSE, FALSE, 4.0); win->operator = gtk_entry_new(); - gtk_entry_set_text(GTK_ENTRY(win->operator), proj->ambi_params.operator); + if ( proj->ambi_params.operator != NULL ) { + gtk_entry_set_text(GTK_ENTRY(win->operator), proj->ambi_params.operator); + } gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(win->operator), FALSE, FALSE, 4.0); g_signal_connect(G_OBJECT(win->use_operator), "toggled", |