Hi Dom,
If you type
abiword --plugin AbiCommand
you get an immediate segfault. This patch fixes that. Please commit this.
Cheers
Martin
? colorenv
? local_gnome
? plugin_loader.diff
? src/Linux_2.4.9-21smp_i386_GNOME
Index: src/wp/ap/unix/gnome/ap_UnixGnomeApp.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/unix/gnome/ap_UnixGnomeApp.cpp,v
retrieving revision 1.42
diff -u -r1.42 ap_UnixGnomeApp.cpp
--- src/wp/ap/unix/gnome/ap_UnixGnomeApp.cpp 15 Apr 2002 19:58:02 -0000 1.42
+++ src/wp/ap/unix/gnome/ap_UnixGnomeApp.cpp 18 Apr 2002 00:52:17 -0000
@@ -309,16 +309,19 @@
//
const char * szName = NULL;
XAP_Module * pModule = NULL;
-
- const UT_Vector * pVec = XAP_ModuleManager::instance().enumModules ();
+ plugin = poptGetArg(poptcon);
bool bFound = false;
- for (UT_uint32 i = 0; (i < pVec->size()) && !bFound; i++)
+ if(plugin != NULL)
{
- pModule = (XAP_Module *)pVec->getNthItem (i);
- szName = pModule->getModuleInfo()->name;
- if(UT_strcmp(szName,plugin) == 0)
+ const UT_Vector * pVec =
+XAP_ModuleManager::instance().enumModules ();
+ for (UT_uint32 i = 0; (i < pVec->size()) && !bFound; i++)
{
- bFound = true;
+ pModule = (XAP_Module *)pVec->getNthItem (i);
+ szName = pModule->getModuleInfo()->name;
+ if(UT_strcmp(szName,plugin) == 0)
+ {
+ bFound = true;
+ }
}
}
if(!bFound)