-rw-r--r-- | core/apps/textedit/textedit.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index 797c61b..5edf102 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -1174,7 +1174,8 @@ if(featureAutoSave) | |||
1174 | } | 1174 | } |
1175 | 1175 | ||
1176 | void TextEdit::gotoLine() { | 1176 | void TextEdit::gotoLine() { |
1177 | 1177 | if( editor->length() < 1) | |
1178 | return; | ||
1178 | QWidget *d = QApplication::desktop(); | 1179 | QWidget *d = QApplication::desktop(); |
1179 | gotoEdit = new QLineEdit( 0, "Goto line"); | 1180 | gotoEdit = new QLineEdit( 0, "Goto line"); |
1180 | 1181 | ||
@@ -1187,6 +1188,7 @@ void TextEdit::gotoLine() { | |||
1187 | void TextEdit::doGoto() { | 1188 | void TextEdit::doGoto() { |
1188 | QString number = gotoEdit->text(); | 1189 | QString number = gotoEdit->text(); |
1189 | gotoEdit->hide(); | 1190 | gotoEdit->hide(); |
1191 | |||
1190 | if(gotoEdit) { | 1192 | if(gotoEdit) { |
1191 | delete gotoEdit; | 1193 | delete gotoEdit; |
1192 | gotoEdit = 0; | 1194 | gotoEdit = 0; |