Skip to content

Commit 49811d3

Browse files
committed
fix(UI): hang by unexpected nullptr in StandardLayout calculation
1 parent 8b88df2 commit 49811d3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

WeaselUI/StandardLayout.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ bool weasel::StandardLayout::_IsHighlightOverCandidateWindow(CRect& rc,
139139
Gdiplus::Region hlRegion(&hlPath);
140140
Gdiplus::Region* tmpRegion = hlRegion.Clone();
141141

142+
if (!tmpRegion)
143+
return false;
142144
tmpRegion->Xor(&bgRegion);
143145
tmpRegion->Exclude(&bgRegion);
144146

0 commit comments

Comments
 (0)