Index: third_party/libxslt/libxslt/keys.c |
=================================================================== |
--- third_party/libxslt/libxslt/keys.c (revision 39981) |
+++ third_party/libxslt/libxslt/keys.c (working copy) |
@@ -474,7 +474,7 @@ |
const xmlChar *nameURI) |
{ |
xsltStylesheetPtr style; |
- xsltKeyDefPtr keyd; |
+ xsltKeyDefPtr keyd = NULL; |
int found = 0; |
#ifdef KEY_INIT_DEBUG |
@@ -504,7 +504,7 @@ |
XSLT_TRACE(ctxt,XSLT_TRACE_KEYS,xsltGenericDebug(xsltGenericDebugContext, |
"xsltInitDocKeyTable: did not found %s\n", name)); |
#endif |
- xsltTransformError(ctxt, NULL, keyd->inst, |
+ xsltTransformError(ctxt, NULL, keyd? keyd->inst : NULL, |
"Failed to find key definition for %s\n", name); |
ctxt->state = XSLT_STATE_STOPPED; |
return(-1); |
@@ -517,10 +517,13 @@ |
/** |
* xsltInitAllDocKeys: |
+ * @ctxt: transformation context |
* |
* INTERNAL ROUTINE ONLY |
* |
* Check if any keys on the current document need to be computed |
+ * |
+ * Returns 0 in case of success, -1 in case of failure |
*/ |
int |
xsltInitAllDocKeys(xsltTransformContextPtr ctxt) |