X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fprogramdata.cpp;fp=source%2Fprogramdata.cpp;h=4d8ca4dd1adabc338967ab91bc2e817091d18a49;hp=4a6c262a37a646bfd128f3cda4143ae5007e2a70;hb=24c58bfd2c3c80d879ec796b2f206bdba8d9e58d;hpb=0679a0fff9c5541a2dacce12058f5bd20b838280 diff --git a/source/programdata.cpp b/source/programdata.cpp index 4a6c262a..4d8ca4dd 100644 --- a/source/programdata.cpp +++ b/source/programdata.cpp @@ -109,15 +109,16 @@ void ProgramData::uniform(const string &name, Uniform *uni) if(i>=0) { uniforms[i].replace_value(uni); - - if(static_cast(i)=MASK_BITS) + { + delete uni; + throw too_many_uniforms(name); + } + vector::iterator j = lower_bound(uniforms.begin(), uniforms.end(), name, uniform_name_compare); NamedUniform nu;