Update headers, fix style for some py files
[alexxy/gromacs.git] / src / python / sip / topology / atoms.sip
index 3dd3d086562120315e7846fc31adec2a230d738a..3f97896d9384e02b17cb951220077df10b230bcd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -57,7 +57,7 @@ struct t_resinfo {
 
     SIP_PYOBJECT /* char** */      name /NoSetter/ {      /* Pointer to the residue name          */
     %GetCode
-        sipPy = sipBuildResult(NULL, "A", *(sipCpp->name));
+        sipPy = sipBuildResult(NULL, "A", (sipCpp->name) ? *(sipCpp->name) : NULL);
     %End
     };
     int             nr;         /* Residue number                       */
@@ -66,7 +66,7 @@ struct t_resinfo {
     char            chainid;    /* Chain identifier written/read to pdb */
     SIP_PYOBJECT /* char** */      rtp /NoSetter/ {       /* rtp building block name (optional)   */
     %GetCode
-        sipPy = sipBuildResult(NULL, "A", *(sipCpp->rtp));
+        sipPy = sipBuildResult(NULL, "A", (sipCpp->rtp) ? *(sipCpp->rtp) : NULL);
     %End
     };
 };