summaryrefslogtreecommitdiff
path: root/plugins/mTextControl/src/fancy_rtf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mTextControl/src/fancy_rtf.cpp')
-rw-r--r--plugins/mTextControl/src/fancy_rtf.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/mTextControl/src/fancy_rtf.cpp b/plugins/mTextControl/src/fancy_rtf.cpp
index faaef95c72..e94ef784af 100644
--- a/plugins/mTextControl/src/fancy_rtf.cpp
+++ b/plugins/mTextControl/src/fancy_rtf.cpp
@@ -145,7 +145,11 @@ void bbCodeParse(IFormattedTextDraw *ftd)
fBBCode = bbCodes + i;
found = true;
- if (fText) delete[] fText;
+ if (fText)
+ {
+ delete[] fText;
+ fText = nullptr;
+ }
if (bbCodes[i].end) {
TEXTRANGE trg;
trg.chrg.cpMin = fte.chrg.cpMin;