X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=isl_stream.c;h=68f6e522495c409339dac6dbdcca2fb500436a63;hb=26e31aee53f3746a805dcfcce2335409aaf8af5b;hp=db594688845a42dbf1bfddd5384eaa8ec9c7352f;hpb=f53869239275299d045f11ddbf71c9f590e73979;p=platform%2Fupstream%2Fisl.git diff --git a/isl_stream.c b/isl_stream.c index db59468..68f6e52 100644 --- a/isl_stream.c +++ b/isl_stream.c @@ -1,7 +1,7 @@ /* * 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 @@ -173,7 +173,10 @@ struct isl_stream* isl_stream_new_file(struct isl_ctx *ctx, FILE *file) 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;