GNOME Bugzilla – Bug 742391
applications, userguides: Don't detect locale changes if we failed to create the miner
Last modified: 2015-01-06 12:50:11 UTC
If construction of the miner object failed then g_initable_new returns NULL. Calling detect_locale_changed with NULL will lead to a crash. See https://bugzilla.redhat.com/show_bug.cgi?id=1178483 and https://bugzilla.redhat.com/show_bug.cgi?id=1178485
Created attachment 293836 [details] [review] miners: Detect locale changes only when the miner could be constructed
Review of attachment 293836 [details] [review]: Seems obviously correct to me: moving detect_locale_changed() inside the initable_init() callback so it only gets called on success (plus code rearrangement to avoid needing to declare detect_locale_changed() and miner_applications_reset() in advance)
Comment on attachment 293836 [details] [review] miners: Detect locale changes only when the miner could be constructed Thanks for the review, Sam.