Bug 421081 - Toolbar is used before checking against nullptr in KisMainWindow.cpp
Summary: Toolbar is used before checking against nullptr in KisMainWindow.cpp
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (other bugs)
Version First Reported In: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-05 20:36 UTC by Rafał Mikrut
Modified: 2020-05-06 08:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafał Mikrut 2020-05-05 20:36:58 UTC
```

        KToolBar * toolBar = ::qobject_cast<KToolBar *>(it);
        toolBar->setMovable(KisConfig(true).readEntry<bool>("LockAllDockerPanels", false));

        if (toolBar) {

```
https://invent.kde.org/kde/krita/-/blob/master/libs/ui/KisMainWindow.cpp#L514-517
Comment 1 Halla Rempt 2020-05-06 08:12:11 UTC
Git commit abac7729eed0abf50da65a01575c2f937c3cabc0 by Boudewijn Rempt.
Committed on 06/05/2020 at 08:07.
Pushed by rempt into branch 'krita/4.3'.

Check pointer before dereferencing

M  +1    -2    libs/ui/KisMainWindow.cpp

https://invent.kde.org/kde/krita/commit/abac7729eed0abf50da65a01575c2f937c3cabc0
Comment 2 Halla Rempt 2020-05-06 08:12:41 UTC
Git commit 79f44ba0da8c8e7048fe4b2a0afc79355fc4a131 by Boudewijn Rempt.
Committed on 06/05/2020 at 08:12.
Pushed by rempt into branch 'master'.

Check pointer before dereferencing
(cherry picked from commit abac7729eed0abf50da65a01575c2f937c3cabc0)

M  +1    -2    libs/ui/KisMainWindow.cpp

https://invent.kde.org/kde/krita/commit/79f44ba0da8c8e7048fe4b2a0afc79355fc4a131