mirror of https://github.com/xemu-project/xemu.git
nv2a/vk: Ensure error message is always set on instance failure
This commit is contained in:
parent
0169caadd0
commit
84c09c631c
|
@ -694,10 +694,14 @@ void pgraph_vk_init_instance(PGRAPHState *pg, Error **errp)
|
|||
return;
|
||||
}
|
||||
|
||||
if (*errp) {
|
||||
error_prepend(errp, "Failed to initialize Vulkan renderer: ");
|
||||
}
|
||||
pgraph_vk_finalize_instance(pg);
|
||||
|
||||
const char *msg = "Failed to initialize Vulkan renderer";
|
||||
if (*errp) {
|
||||
error_prepend(errp, "%s: ", msg);
|
||||
} else {
|
||||
error_setg(errp, "%s", msg);
|
||||
}
|
||||
}
|
||||
|
||||
void pgraph_vk_finalize_instance(PGRAPHState *pg)
|
||||
|
|
Loading…
Reference in New Issue