Skip to content

Commit 80b4d21

Browse files
committed
workspace: Fix deleting workspace (broken after refactoring).
1 parent 83915dc commit 80b4d21

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/gui/workspace.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ void dt_workspace_create(const char *datadir)
181181
for(GList *l = g_list_first(dbs); l; l = g_list_next(l))
182182
{
183183
char *name = (char *)l->data;
184-
GtkWidget *b = NULL;
185184
const gboolean is_default = strcmp(name, "library.db") == 0;
186185
GtkBox *box = NULL;
187186

@@ -211,6 +210,10 @@ void dt_workspace_create(const char *datadir)
211210
}
212211
else if(!is_default)
213212
{
213+
GList *bc = gtk_container_get_children(GTK_CONTAINER(box));
214+
GtkWidget *b = (GtkWidget *)g_list_first(bc)->data;
215+
g_list_free(bc);
216+
214217
GtkWidget *del = dtgtk_button_new(dtgtk_cairo_paint_remove, 0, NULL);
215218
g_signal_connect(G_OBJECT(del), "clicked",
216219
G_CALLBACK(_workspace_delete_db), session);

0 commit comments

Comments
 (0)