r8253: fixed two crash bugs in ejs. I will send these fixes off to the appweb guys...
[samba.git] / source4 / lib / ejs / var.c
index 6ef1c4d3a381d4bb1fbe314050fd98fddbd19b62..63c0b7b98d0a9a023af8d468323aa60e1d8e6c30 100644 (file)
@@ -602,7 +602,8 @@ MprVar *mprGetProperty(MprVar *obj, const char *property, MprVar *value)
 
        for (prop = getObjChain(obj->properties, property); prop; 
                        prop = prop->forw) {
-               if (prop->name[0] == property[0] && strcmp(prop->name, property) == 0) {
+               if (prop->name && 
+                       prop->name[0] == property[0] && strcmp(prop->name, property) == 0) {
                        break;
                }
        }