Skip to content

Commit

Permalink
when profile is compiled out, dont crash later
Browse files Browse the repository at this point in the history
  • Loading branch information
aras-p committed Dec 29, 2009
1 parent 8762ea1 commit e79ae5b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mojoshader.c
Expand Up @@ -7634,6 +7634,13 @@ const MOJOSHADER_parseData *MOJOSHADER_parse(const char *profile,
ctx = build_context(profile, tokenbuf, bufsize, swiz, swizcount, m, f, d);
if (ctx == NULL)
return &MOJOSHADER_out_of_mem_data;

if (isfail(ctx))
{
retval = build_parsedata(ctx);
destroy_context(ctx);
return retval;
}

verify_swizzles(ctx);

Expand Down

0 comments on commit e79ae5b

Please sign in to comment.