Commit ef9c4347 authored by David King's avatar David King
Browse files

Fix crash when reloading the directory tree

As the directory is cleared during reloading, the selection changes and
this leads to a crash when a directory in the tree is deleted outside of
EasyTAG. Avoid the changed signal being emitted by clearing the
directory tree only when the signal is blocked.

https://bugzilla.redhat.com/show_bug.cgi?id=1121142
parent 31e4167e
......@@ -2636,12 +2636,12 @@ void Browser_Tree_Rebuild (gchar *path_to_load)
current_path = g_strdup(DEFAULT_PATH_TO_MP3);
}
Browser_Tree_Initialize();
/* Select again the memorized path without loading files */
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserTree));
if (selection)
{
g_signal_handlers_block_by_func(G_OBJECT(selection),G_CALLBACK(Browser_Tree_Node_Selected),NULL);
Browser_Tree_Initialize ();
Browser_Tree_Select_Dir(current_path);
g_signal_handlers_unblock_by_func(G_OBJECT(selection),G_CALLBACK(Browser_Tree_Node_Selected),NULL);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment