Skip to content
Commit 5bc0682c authored by David Edmundson's avatar David Edmundson
Browse files

Fix dangly pointer if gp_context_new fails

Summary:
m_deviceModel is typically created in the constructor, except in the
code path where m_context fails.

At this point we have a dangly pointer that the rest of the code uses
uncondiationally

Safer code path is to just create it earlier, we want this object in the
non-error case anyway

BUG: 386533

Test Plan:
Purely code reading
I've not got a fancy camera

Reviewers: #plasma

Differential Revision: https://phabricator.kde.org/D11564
parent 9b02706a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment