Rob Shearman : widl: Check that the structure has been defined in check_remoting_args.

Alexandre Julliard julliard at winehq.org
Wed Jul 2 06:03:30 CDT 2008


Module: wine
Branch: master
Commit: 037fa861ab07be09a90409e5031d8207ddf27bda
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=037fa861ab07be09a90409e5031d8207ddf27bda

Author: Rob Shearman <robertshearman at gmail.com>
Date:   Wed Jul  2 00:01:42 2008 +0100

widl: Check that the structure has been defined in check_remoting_args.

---

 tools/widl/parser.y |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index bb54b43..6616193 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -2611,7 +2611,12 @@ static void check_remoting_fields(const var_t *var, type_t *type)
     type->checked = TRUE;
 
     if (is_struct(type->type))
-        fields = type->fields_or_args;
+    {
+        if (type->defined)
+            fields = type->fields_or_args;
+        else
+            error_loc_info(&var->loc_info, "undefined type declaration %s\n", type->name);
+    }
     else if (is_union(type->type))
     {
         if (type->type == RPC_FC_ENCAPSULATED_UNION)




More information about the wine-cvs mailing list