main-executable: don't crash on NULL app_icon_path

This commit is contained in:
Mis012 2024-12-20 00:02:18 +01:00
parent 4acd99f1e2
commit df5390db5e

View file

@ -647,7 +647,7 @@ static void open(GtkApplication *app, GFile **files, gint nfiles, const gchar *h
else
_SET_INT_FIELD(configuration, "screenLayout", /*SCREENLAYOUT_SIZE_NORMAL*/ 0x02);
if (app_icon_path) {
if (!d->apk_instrumentation_class && app_icon_path) {
char *app_icon_path_full = malloc(strlen(app_data_dir) + 1 + strlen(app_icon_path) + 1); // +1 for /, +1 for NULL
sprintf(app_icon_path_full, "%s/%s", app_data_dir, app_icon_path);