Zebediah Figura : d3dx9: Don't mark annotation variables as dirty.
Alexandre Julliard
julliard at winehq.org
Wed Feb 9 16:03:50 CST 2022
Module: wine
Branch: master
Commit: 47351a609d71016f376b29aae09952d87aa0df95
URL: https://source.winehq.org/git/wine.git/?a=commit;h=47351a609d71016f376b29aae09952d87aa0df95
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Mon Feb 7 17:24:34 2022 -0600
d3dx9: Don't mark annotation variables as dirty.
This fixes a crash when trying to set their value.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3dx9_36/effect.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c
index b8c957245a6..310e5c0bf17 100644
--- a/dlls/d3dx9_36/effect.c
+++ b/dlls/d3dx9_36/effect.c
@@ -1313,10 +1313,15 @@ static void *record_parameter(struct d3dx_effect *effect, struct d3dx_parameter
static void set_dirty(struct d3dx_parameter *param)
{
- struct d3dx_shared_data *shared_data;
struct d3dx_top_level_parameter *top_param = param->top_level_param;
- ULONG64 new_update_version = next_update_version(top_param->version_counter);
+ struct d3dx_shared_data *shared_data;
+ ULONG64 new_update_version;
+
+ /* This is true for annotations. */
+ if (!top_param)
+ return;
+ new_update_version = next_update_version(top_param->version_counter);
if ((shared_data = top_param->shared_data))
shared_data->update_version = new_update_version;
else
More information about the wine-cvs
mailing list