From: Tom Lane Date: Wed, 20 Sep 2000 15:28:01 +0000 (+0000) Subject: Fix coredump in copyCommentStmt(). X-Git-Tag: REL7_1_BETA~648 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eab8ee9524eb935dcf9339e829ac2c990ef50a5f;p=postgresql Fix coredump in copyCommentStmt(). --- diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 77f17ee0a6..d6883bb339 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -15,7 +15,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.121 2000/09/12 21:06:49 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.122 2000/09/20 15:28:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1920,7 +1920,8 @@ _copyCommentStmt(CommentStmt *from) newnode->objtype = from->objtype; newnode->objname = pstrdup(from->objname); - newnode->objproperty = pstrdup(from->objproperty); + if (from->objproperty) + newnode->objproperty = pstrdup(from->objproperty); Node_Copy(from, newnode, objlist); newnode->comment = pstrdup(from->comment);