mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-21 05:53:12 -07:00
Fix another small Leak
This commit is contained in:
parent
b9367ff12e
commit
e9bb7c8569
1 changed files with 5 additions and 1 deletions
|
@ -77,7 +77,11 @@ unsigned int DynamicGridWidget::CalculateColumns()
|
||||||
void DynamicGridWidget::UpdateLayout()
|
void DynamicGridWidget::UpdateLayout()
|
||||||
{
|
{
|
||||||
while(layout->count() > 0)
|
while(layout->count() > 0)
|
||||||
layout->removeItem(layout->itemAt(0));
|
{
|
||||||
|
auto item = layout->itemAt(0);
|
||||||
|
layout->removeItem(item);
|
||||||
|
delete item;
|
||||||
|
}
|
||||||
|
|
||||||
columns = CalculateColumns();
|
columns = CalculateColumns();
|
||||||
if(columns == 0)
|
if(columns == 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue