summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index b81f3b4..ce868d6 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -1181,9 +1181,13 @@ void TextEdit::gotoLine() {
void TextEdit::doGoto() {
QString number = gotoEdit->text();
gotoEdit->hide();
- if(gotoEdit) delete gotoEdit;
+ if(gotoEdit) {
+ delete gotoEdit;
+ gotoEdit = 0;
+ }
+
bool ok;
int lineNumber = number.toInt(&ok, 10);
if(editor->numLines() < lineNumber)
QMessageBox::message(tr("Text Edit"),tr("Not enough lines"));