Fix icon loading with wrong image extension

This commit is contained in:
o9000 2015-05-03 16:22:23 +02:00
parent 487774eac9
commit 1d02b8588b

View file

@ -213,8 +213,9 @@ int resize_launcher(void *obj)
free_icon(launcherIcon->icon_scaled);
launcherIcon->icon_original = launcherIcon->icon_scaled = NULL;
// Load the new file and scale
launcherIcon->icon_original = imlib_load_image_immediately(new_icon_path);
#ifdef HAVE_RSVG
if (g_str_has_suffix(new_icon_path, ".svg")) {
if (!launcherIcon->icon_original && g_str_has_suffix(new_icon_path, ".svg")) {
GError* err = NULL;
RsvgHandle* svg = rsvg_handle_new_from_file(new_icon_path, &err);