From ac0bddc83fd4d3ee5a064865f7333a3911279559 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Tue, 17 Apr 2007 14:20:46 +0200
Subject: [PATCH] Fixed bug in add_global_program when called with NULL.

Rev: src/constants.c:1.57
---
 src/constants.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/constants.c b/src/constants.c
index d0100fd1a5..46742b5027 100644
--- a/src/constants.c
+++ b/src/constants.c
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: constants.c,v 1.56 2006/01/14 18:18:45 nilsson Exp $
+|| $Id: constants.c,v 1.57 2007/04/17 12:20:46 grubba Exp $
 */
 
 #include "global.h"
@@ -68,7 +68,7 @@ PMOD_EXPORT void add_global_program(const char *name, struct program *p)
   s.type=T_PROGRAM;
   s.subtype=0;
   s.u.program=p;
-  low_add_constant(name, &s);
+  low_add_constant(name, p?&s:NULL);
 }
 
 #undef INIT_BLOCK
-- 
GitLab