File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -169,13 +169,17 @@ update_button_types (CajaPathBar *path_bar)
169169 button_data = BUTTON_DATA (list -> data );
170170 if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_data -> button )))
171171 {
172- path = button_data -> path ;
172+ /*Increase the reference count on path so it does not get cleared
173+ *by caja_path_bar_clear_buttons during caja_path_bar_update_path
174+ */
175+ path = g_object_ref (button_data -> path );
173176 break ;
174177 }
175178 }
176179 if (path != NULL )
177180 {
178181 caja_path_bar_update_path (path_bar , path , TRUE);
182+ g_object_unref (path );
179183 }
180184}
181185
@@ -2103,6 +2107,7 @@ caja_path_bar_update_path (CajaPathBar *path_bar,
21032107 }
21042108
21052109 path_bar -> current_path = g_object_ref (file_path );
2110+
21062111 path_bar -> current_button_data = current_button_data ;
21072112
21082113 return result ;
You can’t perform that action at this time.
0 commit comments