summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-12-07 18:31:17 +0100
committerLaurent Montel <[email protected]>2018-12-07 18:31:17 +0100
commitd6cadc396c1e44a5433811f30dacfe0c1477ec1d (patch)
treea5ba1339b7971756c485b1d3d083347a7a405283
parenta6b16d62be9ba256ec467caa5d6ba934c1afd436 (diff)
Fix crash when we delete elementv18.12.1
-rw-r--r--ksirkskineditor/mainwindow.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/ksirkskineditor/mainwindow.cpp b/ksirkskineditor/mainwindow.cpp
index 1322497..b460454 100644
--- a/ksirkskineditor/mainwindow.cpp
+++ b/ksirkskineditor/mainwindow.cpp
@@ -1311,6 +1311,7 @@ void MainWindow::slotNewCountry()
void MainWindow::slotDeleteCountry()
{
if (m_onu == 0) return;
+ if (!m_skinDefWidget->countrieslist->currentItem()) return;
qCDebug(KSIRKSKINEDITOR_LOG);
int answer = KMessageBox::warningContinueCancel(this, i18n("Do you really want to delete country '%1'?", m_skinDefWidget->countrieslist->currentItem()->text()), i18n("Really delete country?"));
if (answer == KMessageBox::Cancel)
@@ -1339,6 +1340,7 @@ void MainWindow::slotNewContinent()
void MainWindow::slotDeleteContinent()
{
if (m_onu == 0) return;
+ if (!m_skinDefWidget->continentslist->currentItem()) return;
qCDebug(KSIRKSKINEDITOR_LOG);
int answer = KMessageBox::warningContinueCancel(this, i18n("Do you really want to delete continent '%1'?", m_skinDefWidget->continentslist->currentItem()->text()), i18n("Really delete continent?"));
if (answer == KMessageBox::Cancel)
@@ -1887,6 +1889,7 @@ void MainWindow::slotNewGoal()
void MainWindow::slotDeleteGoal()
{
if (m_onu == 0) return;
+ if (!m_skinDefWidget->goalslist->currentItem()) return;
qCDebug(KSIRKSKINEDITOR_LOG);
int answer = KMessageBox::warningContinueCancel(this, i18n("Do you really want to delete goal '%1'?", m_skinDefWidget->goalslist->currentItem()->text()), i18n("Really delete goal?"));
if (answer == KMessageBox::Cancel)
@@ -1955,6 +1958,7 @@ void MainWindow::slotNewNationality()
void MainWindow::slotDeleteNationality()
{
if (m_onu == 0) return;
+ if (!m_skinDefWidget->nationalitieslist->currentItem()) return;
qCDebug(KSIRKSKINEDITOR_LOG);
int answer = KMessageBox::warningContinueCancel(this, i18n("Do you really want to delete nationality '%1'?", m_skinDefWidget->nationalitieslist->currentItem()->text()), i18n("Really delete nationality?"));
if (answer == KMessageBox::Cancel)
@@ -2112,7 +2116,6 @@ void MainWindow::slotCavalryxValueChanged(int v)
m_onu->setDirty();
}
}
-
void MainWindow::slotCavalryyValueChanged(int v)
{
qCDebug(KSIRKSKINEDITOR_LOG);