[4/7] widl: Fix crash dealing with anonymous unions

Dan Hipschman dsh at linux.ucla.edu
Mon Jun 25 20:24:53 CDT 2007


This patch fixes a crash when dealing with anonymous unions in the same
structure as a correlation variable.

---
 tools/widl/typegen.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 5fec7c7..f3958dd 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -574,7 +574,7 @@ static size_t write_conf_or_var_desc(FILE *file, const func_t *func, const type_
             {
                 unsigned int align = 0;
                 /* FIXME: take alignment into account */
-                if (!strcmp(var->name, subexpr->u.sval))
+                if (var->name && !strcmp(var->name, subexpr->u.sval))
                 {
                     correlation_variable = var->type;
                     break;



More information about the wine-patches mailing list