summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index cb46da43b..0787fed63 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -70,7 +70,9 @@ static void set_default_dive_computer_device(const char *name)
return;
if (is_default_dive_computer_device(name))
return;
- default_dive_computer_device = name;
+ if (default_dive_computer_device)
+ free((void *)default_dive_computer_device);
+ default_dive_computer_device = strdup(name);
subsurface_set_conf("dive_computer_device", PREF_STRING, name);
}
@@ -813,14 +815,14 @@ static void about_dialog(GtkWidget *w, gpointer data)
if (need_icon) {
GtkWidget *image = gtk_image_new_from_file(subsurface_icon_name());
- if (image) {
+ if (gtk_image_get_storage_type(GTK_IMAGE(image)) == GTK_IMAGE_PIXBUF) {
logo = gtk_image_get_pixbuf(GTK_IMAGE(image));
logo_property = "logo";
}
}
gtk_show_about_dialog(NULL,
- "program-name", "SubSurface",
+ "program-name", "Subsurface",
"comments", "Multi-platform divelog software in C",
"license", "GPLv2",
"version", VERSION_STRING,
@@ -1105,6 +1107,8 @@ void exit_ui(void)
free((char *)default_filename);
if (existing_filename)
free((void *)existing_filename);
+ if (default_dive_computer_device)
+ free((void *)default_dive_computer_device);
}
typedef struct {