diff options
author | nyamatongwe <devnull@localhost> | 2010-08-07 08:51:20 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2010-08-07 08:51:20 +1000 |
commit | f14dbb0cd9360609f875e3c641c12f745d5fbdf9 (patch) | |
tree | ada14ffec1d202c47a77b0b2f2403f03b0536e7c | |
parent | aeac272de9dcc2ba49a8c0662745bc6db98d7be5 (diff) | |
download | scintilla-mirror-f14dbb0cd9360609f875e3c641c12f745d5fbdf9.tar.gz |
Fix crash when calling SCI_REPLACETARGETRE without having done a search first.
-rw-r--r-- | src/Document.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index fa8ec0857..94b557499 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1437,7 +1437,10 @@ long Document::FindText(int minPos, int maxPos, const char *search, } const char *Document::SubstituteByPosition(const char *text, int *length) { - return regex->SubstituteByPosition(this, text, length); + if (regex) + return regex->SubstituteByPosition(this, text, length); + else + return 0; } int Document::LinesTotal() const { |