mojoshader.c
branchtrunk
changeset 251 290378a53579
parent 250 b75c08291021
child 252 59a608b65a0a
equal deleted inserted replaced
250:b75c08291021 251:290378a53579
  4689     {
  4689     {
  4690         int i;
  4690         int i;
  4691 
  4691 
  4692         Free(ctx, output);
  4692         Free(ctx, output);
  4693 
  4693 
  4694         for (i = 0; i < ctx->uniform_count; i++)
  4694         if (uniforms != NULL)
  4695             Free(ctx, (void *) uniforms[i].name);
  4695         {
  4696         Free(ctx, uniforms);
  4696             for (i = 0; i < ctx->uniform_count; i++)
  4697 
  4697                 Free(ctx, (void *) uniforms[i].name);
  4698         for (i = 0; i < attribute_count; i++)
  4698             Free(ctx, uniforms);
  4699             Free(ctx, (void *) attributes[i].name);
  4699         } // if
  4700         Free(ctx, attributes);
  4700 
  4701 
  4701         if (attributes != NULL)
  4702         for (i = 0; i < ctx->sampler_count; i++)
  4702         {
  4703             Free(ctx, (void *) samplers[i].name);
  4703             for (i = 0; i < attribute_count; i++)
  4704         Free(ctx, samplers);
  4704                 Free(ctx, (void *) attributes[i].name);
       
  4705             Free(ctx, attributes);
       
  4706         } // if
       
  4707 
       
  4708         if (samplers != NULL)
       
  4709         {
       
  4710             for (i = 0; i < ctx->sampler_count; i++)
       
  4711                 Free(ctx, (void *) samplers[i].name);
       
  4712             Free(ctx, samplers);
       
  4713         } // if
  4705 
  4714 
  4706         retval->error = ctx->failstr;  // we recycle.  :)
  4715         retval->error = ctx->failstr;  // we recycle.  :)
  4707         ctx->failstr = NULL;  // don't let this get free()'d too soon.
  4716         ctx->failstr = NULL;  // don't let this get free()'d too soon.
  4708     } // if
  4717     } // if
  4709     else
  4718     else