/*
* Copyright 2008-2009 Katholieke Universiteit Leuven
*
- * Use of this software is governed by the GNU LGPLv2.1 license
+ * Use of this software is governed by the MIT license
*
* Written by Sven Verdoolaege, K.U.Leuven, Departement
* Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
struct isl_stream* isl_stream_new_str(struct isl_ctx *ctx, const char *str)
{
- struct isl_stream *s = isl_stream_new(ctx);
+ struct isl_stream *s;
+ if (!str)
+ return NULL;
+ s = isl_stream_new(ctx);
if (!s)
return NULL;
s->str = str;