You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2006/02/08 12:17:41 UTC

svn commit: r375928 - /webservices/axis2/trunk/c/modules/xml/om/om_element.c

Author: samisa
Date: Wed Feb  8 03:17:37 2006
New Revision: 375928

URL: http://svn.apache.org/viewcvs?rev=375928&view=rev
Log:
Fixed the seg fault

Modified:
    webservices/axis2/trunk/c/modules/xml/om/om_element.c

Modified: webservices/axis2/trunk/c/modules/xml/om/om_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_element.c?rev=375928&r1=375927&r2=375928&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_element.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_element.c Wed Feb  8 03:17:37 2006
@@ -625,10 +625,12 @@
                                 axis2_env_t **env,
                                 axis2_qname_t *qname)
 {
+    axis2_om_element_impl_t *element_impl = NULL;
     axis2_char_t *name = NULL;
     axis2_om_attribute_t *attr = NULL;
     AXIS2_FUNC_PARAM_CHECK(om_element, env, NULL);
-    
+    element_impl = AXIS2_INTF_TO_IMPL(om_element);
+
     if (!qname)
     {
         AXIS2_ERROR_SET_ERROR_NUMBER((*env)->error, 
@@ -637,8 +639,10 @@
         return NULL;
     }
     name = AXIS2_QNAME_TO_STRING(qname, env);
-    attr = (axis2_om_attribute_t*) (axis2_hash_get(AXIS2_INTF_TO_IMPL(
-        om_element)->attributes, name, AXIS2_HASH_KEY_STRING));
+    if (element_impl->attributes)
+    {
+        attr = (axis2_om_attribute_t*) (axis2_hash_get(element_impl->attributes, name, AXIS2_HASH_KEY_STRING));
+    }
     return attr;
 }