mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-06-07 17:11:56 +00:00
add forgotten size checks
This commit is contained in:
parent
1077849746
commit
95293a3366
2 changed files with 6 additions and 0 deletions
|
@ -84,6 +84,9 @@ void* DynamicGPUBuffer::beginWrite(BufDataType type, size_t newsize, unsigned ac
|
|||
_size = newsize;
|
||||
_datatype = type;
|
||||
|
||||
if(!newsize)
|
||||
return NULL;
|
||||
|
||||
if(_HasARB)
|
||||
{
|
||||
const unsigned id = _ensureDBuf();
|
||||
|
|
|
@ -93,6 +93,9 @@ public:
|
|||
float y, const float *top_color, const float *bottom_color, float alpha, float lastAlpha) const
|
||||
{
|
||||
const size_t sz = text.size();
|
||||
if(!sz)
|
||||
return;
|
||||
|
||||
const size_t bytes = sz * 4 * (2+2+4) * sizeof(float);
|
||||
|
||||
const float tw = header.tex_width * scalar;
|
||||
|
|
Loading…
Add table
Reference in a new issue