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 740114 - No verification that SudokuView exists before calling its methods
No verification that SudokuView exists before calling its methods
Status: RESOLVED FIXED
Product: gnome-sudoku
Classification: Applications
Component: general
git master
Other Linux
: Normal minor
: ---
Assigned To: gnome-sudoku-maint
gnome-sudoku-maint
Depends on:
Blocks:
 
 
Reported: 2014-11-14 11:50 UTC by Andrei Ghincu
Modified: 2014-11-14 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
My proposed patch (1.80 KB, patch)
2014-11-14 11:55 UTC, Andrei Ghincu
committed Details | Review

Description Andrei Ghincu 2014-11-14 11:50:05 UTC
When changing the options (highlighter and warnings) from the menu during the
'Select Difficulty' screen the following errors were shown:
** (gnome-sudoku:11303): CRITICAL **: sudoku_view_set_highlighter: assertion 'self != NULL' failed
and for the warnings option:
** (gnome-sudoku:11303): CRITICAL **: sudoku_view_set_show_warnings: assertion 'self != NULL' failed
(even though the changes were still applied when the new game started).
I think it would be good to do the extra checks that the SudokuView object exists before trying to use its methods.
I'll attach my proposed patch in a comment bellow.
Comment 1 Andrei Ghincu 2014-11-14 11:55:08 UTC
Created attachment 290706 [details] [review]
My proposed patch
Comment 2 Michael Catanzaro 2014-11-14 14:00:41 UTC
Review of attachment 290706 [details] [review]:

Indeed. I'm just going to change the formatting a bit on this patch before pushing it. Thanks!