mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 10:23:23 +00:00
Prevent crash when no default device is set
We were dereferencing the default device, even if not set. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9904272d2f
commit
d5da3c9a95
1 changed files with 2 additions and 1 deletions
|
@ -1700,7 +1700,8 @@ static GtkComboBox *dc_device_selector(GtkWidget *vbox)
|
||||||
if (default_index != -1)
|
if (default_index != -1)
|
||||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), default_index);
|
gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), default_index);
|
||||||
else
|
else
|
||||||
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(combo_box))),
|
if (default_dive_computer_device)
|
||||||
|
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(combo_box))),
|
||||||
default_dive_computer_device);
|
default_dive_computer_device);
|
||||||
|
|
||||||
return GTK_COMBO_BOX(combo_box);
|
return GTK_COMBO_BOX(combo_box);
|
||||||
|
|
Loading…
Add table
Reference in a new issue