2006-12-12 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Description / ProtocolImporter.cs
index 3d47a2a339f258a818b74fa4258853b04112c64a..c6420a15569c4bfa674bcd1f1980be4fd10932d2 100644 (file)
@@ -545,7 +545,7 @@ namespace System.Web.Services.Description {
                        foreach (XmlSchemaObject ob in sc.Includes)
                        {
                                XmlSchemaImport import = ob as XmlSchemaImport;
-                               if (import.Namespace == SoapProtocolReflector.EncodingNamespace) return true;
+                               if (import != null && import.Namespace == SoapProtocolReflector.EncodingNamespace) return true;
                        }
                        return false;
                }