1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

[GreaseMonkey] Fixed crash when deleting userscript.

This commit is contained in:
nowrep 2013-03-05 21:40:34 +01:00
parent 21d201752d
commit cc93b67002

View File

@ -76,8 +76,8 @@ void GM_Settings::removeItem(QListWidgetItem* item)
tr("Are you sure you want to remove '%1'?").arg(script->name()),
QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes && m_manager->removeScript(script)) {
delete item;
if (button == QMessageBox::Yes) {
m_manager->removeScript(script);
}
}