summaryrefslogtreecommitdiff
path: root/api/utilpub.c
diff options
context:
space:
mode:
Diffstat (limited to 'api/utilpub.c')
-rw-r--r--api/utilpub.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/api/utilpub.c b/api/utilpub.c
index 3d3dd5ad..933ab96a 100644
--- a/api/utilpub.c
+++ b/api/utilpub.c
@@ -259,7 +259,8 @@ Uint2 entityID, Uint4 itemID, Uint2 itemtype)
if (pdp) {
descr = AsnIoMemCopy(pdp, (AsnReadFunc) PubdescAsnRead,
(AsnWriteFunc) PubdescAsnWrite);
- vnp = ValNodeNew(NULL);
+ if (descr == NULL) return NULL;
+ vnp = ValNodeNew(NULL);
vnp->choice = PUB_Equiv;
vnp->data.ptrvalue = descr->pub;
psp = (PubStructPtr) MemNew(sizeof(PubStruct));
@@ -1595,6 +1596,12 @@ NLM_EXTERN void EntryStripSerialNumber (SeqEntryPtr sep)
}
}
+NLM_EXTERN void ForceStripSerialNumber (SeqEntryPtr sep)
+{
+ if (sep == NULL) return;
+ SeqEntryExplore(sep, NULL, StripSerialNumber);
+}
+
NLM_EXTERN ValNodePtr remove_node(ValNodePtr head, ValNodePtr x)
{
ValNodePtr v, p;