mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-04 03:40:07 +00:00
Fixed Array::remove (ElementType*) so that if given an invalid pointer, it doesn't attempt to remove anything after the assert.
This commit is contained in:
parent
a440c16d89
commit
e8cdc65357
1 changed files with 6 additions and 1 deletions
|
|
@ -853,7 +853,12 @@ public:
|
|||
|
||||
jassert (data.elements != nullptr);
|
||||
const int indexToRemove = int (elementToRemove - data.elements);
|
||||
jassert (isPositiveAndBelow (indexToRemove, numUsed));
|
||||
|
||||
if (! isPositiveAndBelow (indexToRemove, numUsed))
|
||||
{
|
||||
jassertfalse;
|
||||
return;
|
||||
}
|
||||
|
||||
removeInternal (indexToRemove);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue