Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.72 KB | None | 0 0
  1. diff --git a/menu/drivers/ozone.c b/menu/drivers/ozone.c
  2. index f0d95b611a..0109ad7142 100644
  3. --- a/menu/drivers/ozone.c
  4. +++ b/menu/drivers/ozone.c
  5. @@ -1619,19 +1619,21 @@ static void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
  6.           char *content_texturepath = (char*)
  7.              malloc(PATH_MAX_LENGTH * sizeof(char));
  8.  
  9. +         char *icons_path = strdup(ozone->icons_path);
  10. +
  11.           sysname[0] = texturepath[0] = content_texturepath[0] = '\0';
  12.  
  13.           fill_pathname_base_noext(sysname, path,
  14.                 PATH_MAX_LENGTH * sizeof(char));
  15.  
  16. -         fill_pathname_join_concat(texturepath, ozone->icons_path, sysname,
  17. +         fill_pathname_join_concat(texturepath, icons_path, sysname,
  18.                 file_path_str(FILE_PATH_PNG_EXTENSION),
  19.                 PATH_MAX_LENGTH * sizeof(char));
  20.  
  21.           /* If the playlist icon doesn't exist return default */
  22.  
  23.           if (!filestream_exists(texturepath))
  24. -               fill_pathname_join_concat(texturepath, ozone->icons_path, "default",
  25. +               fill_pathname_join_concat(texturepath, icons_path, "default",
  26.                 file_path_str(FILE_PATH_PNG_EXTENSION),
  27.                 PATH_MAX_LENGTH * sizeof(char));
  28.  
  29. @@ -1655,7 +1657,7 @@ static void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
  30.           fill_pathname_join_delim(sysname, sysname,
  31.                 file_path_str(FILE_PATH_CONTENT_BASENAME), '-',
  32.                 PATH_MAX_LENGTH * sizeof(char));
  33. -         strlcat(content_texturepath, ozone->icons_path, PATH_MAX_LENGTH * sizeof(char));
  34. +         strlcat(content_texturepath, icons_path, PATH_MAX_LENGTH * sizeof(char));
  35.  
  36.           strlcat(content_texturepath, path_default_slash(), PATH_MAX_LENGTH * sizeof(char));
  37.           strlcat(content_texturepath, sysname, PATH_MAX_LENGTH * sizeof(char));
  38. @@ -1663,8 +1665,8 @@ static void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
  39.           /* If the content icon doesn't exist return default-content */
  40.           if (!filestream_exists(content_texturepath))
  41.           {
  42. -            strlcat(ozone->icons_path, "default", PATH_MAX_LENGTH * sizeof(char));
  43. -            fill_pathname_join_delim(content_texturepath, ozone->icons_path,
  44. +            strlcat(icons_path, "default", PATH_MAX_LENGTH * sizeof(char));
  45. +            fill_pathname_join_delim(content_texturepath, icons_path,
  46.                    file_path_str(FILE_PATH_CONTENT_BASENAME), '-',
  47.                    PATH_MAX_LENGTH * sizeof(char));
  48.           }
  49. @@ -1718,6 +1720,7 @@ static void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
  50.           free(sysname);
  51.           free(texturepath);
  52.           free(content_texturepath);
  53. +         free(icons_path);
  54.        }
  55.     }
  56.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement