Skip to content

Commit 1f98ccc

Browse files
committed
Fix bug found by warning from recent gcc. patch from Tim Bunce.
1 parent b0509ef commit 1f98ccc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/pl/plperl/plperl.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**********************************************************************
22
* plperl.c - perl as a procedural language for PostgreSQL
33
*
4-
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.161 2010/01/26 23:11:56 adunstan Exp $
4+
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.162 2010/01/28 23:06:09 adunstan Exp $
55
*
66
**********************************************************************/
77

@@ -1113,8 +1113,11 @@ plperl_create_sub(plperl_proc_desc *prodesc, char *s, Oid fn_oid)
11131113

11141114
if (count == 1) {
11151115
GV *sub_glob = (GV*)POPs;
1116-
if (sub_glob && SvTYPE(sub_glob) == SVt_PVGV)
1117-
subref = newRV_inc((SV*)GvCVu((GV*)sub_glob));
1116+
if (sub_glob && SvTYPE(sub_glob) == SVt_PVGV) {
1117+
SV *sv = (SV*)GvCVu((GV*)sub_glob);
1118+
if (sv)
1119+
subref = newRV_inc(sv);
1120+
}
11181121
}
11191122

11201123
PUTBACK;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy