Skip to content

Commit

Permalink
Fix null pointer crash
Browse files Browse the repository at this point in the history
  • Loading branch information
dpjudas committed Jan 18, 2024
1 parent 28b54d2 commit 0f58f3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/widgets/lineedit/lineedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,8 @@ int LineEdit::GetCharacterIndex(double mouse_x)
void LineEdit::UpdateTextClipping()
{
Canvas* canvas = GetCanvas();
if (!canvas)
return;

Size text_size = GetVisualTextSize(canvas, clip_start_offset, (int)text.size() - clip_start_offset);

Expand Down

0 comments on commit 0f58f3a

Please sign in to comment.