[Differential] [Request, 4 lines] D1346: Checking whether m_topLevel is not null before getting its property

ivan (Ivan Čukić) noreply at phabricator.kde.org
Thu Apr 7 17:56:46 UTC 2016


ivan created this revision.
ivan added a reviewer: graesslin.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  From the rest of this method, it is obvious that m_topLevel can
  be null in any part of the method - we are checking against it
  being null in a few places in the method - both before and after
  the affending lines.
  
  Now, there is one place where the check is not applied, and
  potentially calls ->window() on the null pointer.
  
  p.s. If there are more places where kwin does clear_or_something(); return;
  it could benefit from introducing on_scope_exit and similar tricks - see
  Alexandrescu's 'Declarative control flow' presentation.

REPOSITORY
  rKWIN KWin

BRANCH
  ivan/null-check-1

REVISION DETAIL
  https://phabricator.kde.org/D1346

AFFECTED FILES
  shadow.cpp

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: ivan, graesslin
Cc: plasma-devel, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160407/03a02fc3/attachment.html>


More information about the Plasma-devel mailing list