--- sfx2/source/doc/objstor.cxx.before	2007-05-03 13:46:37.000000000 +0200
+++ sfx2/source/doc/objstor.cxx	2007-05-03 13:51:58.000000000 +0200
@@ -957,11 +957,15 @@
         	{
             	pImp->nLoadedFlags = 0;
 				pImp->bModelInitialized = sal_False;
-				String aUserData=pFilter->GetUserData();
-				// check whether a prepocessing step is requested in the configuration
-				static const char PREPROCESS_CONST[]="Preprocess=<";
-				int pos=aUserData.Search(::rtl::OUString::createFromAscii(PREPROCESS_CONST).getStr(), 0);
-				int end=aUserData.Search( '>', pos+strlen(PREPROCESS_CONST));
+                int end, pos = STRING_NOTFOUND;
+                String aUserData;
+                static const char PREPROCESS_CONST[]="Preprocess=<";
+                if (pFilter) {
+                    aUserData=pFilter->GetUserData();
+                    // check whether a prepocessing step is requested in the configuration
+                    pos=aUserData.Search(::rtl::OUString::createFromAscii(PREPROCESS_CONST).getStr(), 0);
+                    end=aUserData.Search( '>', pos+strlen(PREPROCESS_CONST));
+                }
 				if (pos!=STRING_NOTFOUND && end!=STRING_NOTFOUND) {
 					String aAppName(aUserData, pos+strlen(PREPROCESS_CONST), end-(pos+strlen(PREPROCESS_CONST)));
 
