diff options
author | nyamatongwe <unknown> | 2010-08-07 08:51:20 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2010-08-07 08:51:20 +1000 |
commit | 94f1ae8a538bc469ebcf9ae5a56e9ba067541831 (patch) | |
tree | 614ab934a9185f5343dbfcab004ff938f71981be /src | |
parent | 37f01ccb6c5292529100ff2f46e0c7c0b12865c5 (diff) | |
download | scintilla-mirror-94f1ae8a538bc469ebcf9ae5a56e9ba067541831.tar.gz |
Fix crash when calling SCI_REPLACETARGETRE without having done a search first.
Diffstat (limited to 'src')
-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 { |