-#if WXWIN_COMPATIBILITY_2_6
- if (factory->IsKindOf(CLASSINFO(wxZipClassFactory)))
- ((wxZipInputStream*)s)->m_allowSeeking = true;
+ delete s;
+ return NULL;
+ }
+
+#if WXWIN_COMPATIBILITY_2_6 && wxUSE_ZIPSTREAM
+ if (factory->IsKindOf(CLASSINFO(wxZipClassFactory)))
+ ((wxZipInputStream*)s)->m_allowSeeking = true;