mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-12-05 12:49:43 +01:00
Check null pointer for text2FindW to prevent potential crashes
Fix #17086, close #17087
This commit is contained in:
parent
e214d73fe2
commit
cf0a5c8edc
@ -152,6 +152,10 @@ void SmartHighlighter::highlightView(ScintillaEditView * pHighlightView, Scintil
|
|||||||
}
|
}
|
||||||
|
|
||||||
const wchar_t * text2FindW = pHighlightView->getSelectedTextToWChar(false); //do not expand selection (false)
|
const wchar_t * text2FindW = pHighlightView->getSelectedTextToWChar(false); //do not expand selection (false)
|
||||||
|
if (!text2FindW)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
highlightViewWithWord(pHighlightView, text2FindW);
|
highlightViewWithWord(pHighlightView, text2FindW);
|
||||||
|
|
||||||
@ -167,3 +171,6 @@ void SmartHighlighter::highlightView(ScintillaEditView * pHighlightView, Scintil
|
|||||||
highlightViewWithWord(unfocusView, text2FindW);
|
highlightViewWithWord(unfocusView, text2FindW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user