CVS: winex/tools/widl header.c,1.7,1.8

[email protected] 14 Dec 2007 20:22:01 -0000
Newsgroups gmane.comp.emulators.winex.cvs
Message-ID <[email protected]>
Subject: winex/tools/widl header.c,1.7,1.8Update of /var/lib/cvsd/cvsroot/winex/tools/widl
In directory agravaine:/tmp/cvs-serv15736/tools/widl

Modified Files:
	header.c 
Log Message:
Fix crash when trying to emit ICOM compatibility macros for a COM interface
that doesn't define any new methods (beyond the inherited ones).


Index: header.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/tools/widl/header.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- header.c	14 Dec 2007 20:20:06 -0000	1.7
+++ header.c	14 Dec 2007 20:21:59 -0000	1.8
@@ -51,6 +51,11 @@
 {
   const func_t *cur;
 
+  if (!iface->funcs) {
+    fprintf(header, "\n");
+    return;
+  }
+
   LIST_FOR_EACH_ENTRY( cur, iface->funcs, const func_t, entry ) {
     var_t *def = cur->def;
     if (!is_callas(def->attrs)) {