After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761846 - input-chooser: don't access priv pointer before checking no error
input-chooser: don't access priv pointer before checking no error
Status: RESOLVED FIXED
Product: gnome-initial-setup
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Initial Setup maintainer(s)
GNOME Initial Setup maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-02-11 02:27 UTC by Cosimo Cecchi
Modified: 2016-02-11 17:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
input-chooser: don't access priv pointer before checking no error (2.16 KB, patch)
2016-02-11 02:27 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2016-02-11 02:27:14 UTC
See attached patch. This avoids a crash.
Comment 1 Cosimo Cecchi 2016-02-11 02:27:24 UTC
Created attachment 320843 [details] [review]
input-chooser: don't access priv pointer before checking no error

If the GCancellable is cancelled by the finalize() function, the
callback will still be called potentially with an instance of the
CcInputChooser that's not valid anymore.
To avoid crashing in that case, only access the priv pointer of
CcInputChooser when we have no error.
Comment 2 Rui Matos 2016-02-11 13:59:44 UTC
Review of attachment 320843 [details] [review]:

looks good, thanks
Comment 3 Cosimo Cecchi 2016-02-11 17:28:58 UTC
Attachment 320843 [details] pushed as dee6f0c - input-chooser: don't access priv pointer before checking no error