This commit is contained in:
twinaphex 2017-11-25 23:39:31 +01:00
parent 591ffed24a
commit df7513be27
2 changed files with 10 additions and 6 deletions

View File

@ -3229,7 +3229,11 @@ static int action_ok_delete_entry(const char *path,
playlist = g_defaults.image_history;
#endif
playlist_delete_index(playlist, rpl_entry_selection_ptr);
if (playlist)
{
playlist_delete_index(playlist, rpl_entry_selection_ptr);
playlist_write_file(playlist);
}
new_selection_ptr = menu_navigation_get_selection();
menu_entries_pop_stack(&new_selection_ptr, 0, 1);

View File

@ -121,8 +121,6 @@ void playlist_delete_index(playlist_t *playlist,
playlist->size = playlist->size - 1;
playlist->modified = true;
playlist_write_file(playlist);
}
void playlist_get_index_by_path(playlist_t *playlist,
@ -283,17 +281,19 @@ bool playlist_push(playlist_t *playlist,
const char *db_name)
{
size_t i;
bool core_path_empty = string_is_empty(core_path);
bool core_name_empty = string_is_empty(core_name);
if (string_is_empty(core_path) || string_is_empty(core_name))
if (core_path_empty || core_name_empty)
{
if (string_is_empty(core_name) && !string_is_empty(core_path))
if (core_name_empty && !core_path_empty)
{
static char base_path[255] = {0};
fill_pathname_base_noext(base_path, core_path, sizeof(base_path));
core_name = base_path;
}
if (string_is_empty(core_path) || string_is_empty(core_name))
if (core_path_empty || core_name_empty)
{
RARCH_ERR("cannot push NULL or empty core name into the playlist.\n");
return false;