From 7007a1e264c103cfbccfc62b0e19a86a9fa54223 Mon Sep 17 00:00:00 2001 From: Francisco Casas Date: Tue, 12 Aug 2025 10:56:26 -0400 Subject: [PATCH] vkd3d-compiler: Set a default target type even when preprocessing. We largely ignore the target type when preprocessing, but still dereference options.target_type in a couple of places. E.g. when setting info.target_type. We could add more checks for options.preprocess_only to account for that, but it seems more robust to make sure options.target_type is never NULL. --- programs/vkd3d-compiler/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c index e1fd6a7ce..9b36adeea 100644 --- a/programs/vkd3d-compiler/main.c +++ b/programs/vkd3d-compiler/main.c @@ -891,7 +891,7 @@ int main(int argc, char **argv) } } - if (!options.target_type && !options.preprocess_only) + if (!options.target_type) options.target_type = get_target_type_info(options.source_type->default_target_type); if (!options.preprocess_only && !validate_target_type(options.source_type->type, options.target_type->type))