Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Q qtbase
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 9
    • Merge requests 9
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • Qt Project
  • qt
  • qtbase
  • Merge requests
  • !246

Add nullptr guard in QStyleSheetStyle::drawPrimitive(PE_PanelLineEdit)

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Nicolas Fella requested to merge nicolasfella/qtbase:work/nico/QTBUG-104917 into kde/5.15 Mar 15, 2023
  • Overview 1
  • Commits 1
  • Changes 1

Drawing PE_PanelLineEdit in QStyleSheetStyle with the default argument widget = nullptr causes a segfault.

drawPrimitive tries to fall back to a container widget's render rule and therefore calls containerWidget() - which crashes when called with nullptr.

Container widget fallback is pointless when drawPrimitive() is called with widget == nullptr. This patch skips it in that case.

Fixes: QTBUG-104917 Pick-to: 6.4 6.3 6.2 Change-Id: I09e57dccfebb81a308944c233846d5b9ef58819e Reviewed-by: Volker Hilsheimer volker.hilsheimer@qt.io (cherry picked from commit effc8be3)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/nico/QTBUG-104917