From bd7a6dc08befc73c63a748e2b0907c0ac2ae26cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Wed, 25 Aug 2004 16:14:14 +0200
Subject: [PATCH] Made COPY_LINE_NUMBER_INFO() more paranoid regarding FROM.

Rev: src/las.h:1.65
---
 src/las.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/las.h b/src/las.h
index efdcb2dc9b..15a3a03ab6 100644
--- a/src/las.h
+++ b/src/las.h
@@ -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: las.h,v 1.64 2003/11/14 00:42:10 mast Exp $
+|| $Id: las.h,v 1.65 2004/08/25 14:14:14 grubba Exp $
 */
 
 #ifndef LAS_H
@@ -261,9 +261,11 @@ void resolv_program(node *n);
 
 #define COPY_LINE_NUMBER_INFO(TO, FROM) do {				\
     node *to_ = (TO), *from_ = (FROM);					\
-    to_->line_number = from_->line_number;				\
-    free_string (to_->current_file);					\
-    copy_shared_string (to_->current_file, from_->current_file);	\
+    if (from_) {							\
+      to_->line_number = from_->line_number;				\
+      free_string (to_->current_file);					\
+      copy_shared_string (to_->current_file, from_->current_file);	\
+    }									\
   } while (0)
 
 
-- 
GitLab