lv2: fix the situation when restore proceeds after a failed path mapping
This commit is contained in:
parent
e38af66e0a
commit
db6c88f4bd
1 changed files with 14 additions and 8 deletions
22
lv2/sfizz.c
22
lv2/sfizz.c
|
|
@ -993,11 +993,14 @@ restore(LV2_Handle instance,
|
||||||
status = LV2_STATE_ERR_UNKNOWN;
|
status = LV2_STATE_ERR_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(self->sfz_file_path, path, MAX_PATH_SIZE);
|
if (path)
|
||||||
self->sfz_file_path[MAX_PATH_SIZE - 1] = '\0';
|
{
|
||||||
|
strncpy(self->sfz_file_path, path, MAX_PATH_SIZE);
|
||||||
|
self->sfz_file_path[MAX_PATH_SIZE - 1] = '\0';
|
||||||
|
|
||||||
if (map_path)
|
if (map_path)
|
||||||
free_path->free_path(free_path->handle, (char *)path);
|
free_path->free_path(free_path->handle, (char *)path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
value = retrieve(handle, self->sfizz_scala_file_uri, &size, &type, &val_flags);
|
value = retrieve(handle, self->sfizz_scala_file_uri, &size, &type, &val_flags);
|
||||||
|
|
@ -1011,11 +1014,14 @@ restore(LV2_Handle instance,
|
||||||
status = LV2_STATE_ERR_UNKNOWN;
|
status = LV2_STATE_ERR_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(self->scala_file_path, path, MAX_PATH_SIZE);
|
if (path)
|
||||||
self->scala_file_path[MAX_PATH_SIZE - 1] = '\0';
|
{
|
||||||
|
strncpy(self->scala_file_path, path, MAX_PATH_SIZE);
|
||||||
|
self->scala_file_path[MAX_PATH_SIZE - 1] = '\0';
|
||||||
|
|
||||||
if (map_path)
|
if (map_path)
|
||||||
free_path->free_path(free_path->handle, (char *)path);
|
free_path->free_path(free_path->handle, (char *)path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
value = retrieve(handle, self->sfizz_num_voices_uri, &size, &type, &val_flags);
|
value = retrieve(handle, self->sfizz_num_voices_uri, &size, &type, &val_flags);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue