[sword-svn] r1911 - trunk/src/modules/filters

scribe at crosswire.org scribe at crosswire.org
Thu Apr 27 00:21:36 MST 2006


Author: scribe
Date: 2006-04-27 00:21:34 -0700 (Thu, 27 Apr 2006)
New Revision: 1911

Modified:
   trunk/src/modules/filters/gbfwordjs.cpp
Log:
Fixed potential crash with bad markup.


Modified: trunk/src/modules/filters/gbfwordjs.cpp
===================================================================
--- trunk/src/modules/filters/gbfwordjs.cpp	2006-04-25 08:00:46 UTC (rev 1910)
+++ trunk/src/modules/filters/gbfwordjs.cpp	2006-04-27 07:21:34 UTC (rev 1911)
@@ -97,7 +97,9 @@
 					}
 					else {
 						// verb morph
-						(*wordAttrs)["Morph"] = val;
+						if (wordAttrs) {
+							(*wordAttrs)["Morph"] = val;
+						}
 	//printf("Adding: [\"Word\"][%s][\"Morph\"] = %s\n", wordstr, val);
 					}
 
@@ -107,8 +109,10 @@
 						strcpy(val, token+2);
 					}
 					else strcpy(val, token+1);
-					(*wordAttrs)["Morph"] = val;
-					(*wordAttrs)["MorphClass"] = "StrongsMorph";
+					if (wordAttrs) {
+						(*wordAttrs)["Morph"] = val;
+						(*wordAttrs)["MorphClass"] = "StrongsMorph";
+					}
 					newText = true;
 				}
 				// if not a strongs token, keep token in text



More information about the sword-cvs mailing list