aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-03-04 22:06:53 +0100
committerThomas White <taw@physics.org>2018-03-04 22:06:53 +0100
commit6429ecd22f5f002c5323f152c9d395ee9cad55e5 (patch)
tree80e90c2fbf9b6954695478c972fd75806cb7ed57 /src
parent9a5cc035b87a697032ac4977836518fd8161c2fc (diff)
Add a warning
Diffstat (limited to 'src')
-rw-r--r--src/sc_parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sc_parse.c b/src/sc_parse.c
index 26f9303..b39d183 100644
--- a/src/sc_parse.c
+++ b/src/sc_parse.c
@@ -666,6 +666,10 @@ SCBlock *sc_parse(const char *sc)
void sc_block_set_name(SCBlock *bl, char *nam)
{
+ if ( bl == NULL ) {
+ fprintf(stderr, "sc_block_set_name: NULL block\n");
+ return;
+ }
free(bl->name);
bl->name = nam;
}