diff --git a/src/richtext/richtextindentspage.cpp b/src/richtext/richtextindentspage.cpp index d12d681a9f..f73bb16211 100644 --- a/src/richtext/richtextindentspage.cpp +++ b/src/richtext/richtextindentspage.cpp @@ -415,9 +415,12 @@ bool wxRichTextIndentsSpacingPage::TransferDataFromWindow() wxString leftIndent(m_indentLeft->GetValue()); wxString leftFirstIndent(m_indentLeftFirst->GetValue()); - if (!leftIndent.empty()) + if (!leftIndent.empty() || !leftFirstIndent.empty()) { - int visualLeftIndent = wxAtoi(leftIndent); + int visualLeftIndent = 0; + if (!leftIndent.empty()) + visualLeftIndent = wxAtoi(leftIndent); + int visualLeftFirstIndent = wxAtoi(leftFirstIndent); int actualLeftIndent = visualLeftFirstIndent; int actualLeftSubIndent = visualLeftIndent - visualLeftFirstIndent;