fix a crasher when the cursor theme has no icon.

2005-09-16  Sebastien Bacher  <seb128@debian.org>

        * gnome-mouse-properties.c: (populate_tree_model):
        fix a crasher when the cursor theme has no icon.
This commit is contained in:
Sebastien Bacher 2005-09-16 12:43:01 +00:00 committed by Sebastien Bacher
parent 83485c9acf
commit 4608b226d3
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2005-09-16 Sebastien Bacher <seb128@debian.org>
* gnome-mouse-properties.c: (populate_tree_model):
fix a crasher when the cursor theme has no icon.
2005-08-31 Rodrigo Moya <rodrigo@novell.com>
* gnome-mouse-properties.c (delay_value_changed_cb): guard against

View file

@ -708,7 +708,7 @@ populate_tree_model(GtkTreeModelSort* model, GtkTreeSelection* selection) {
for (i = 0; sizes[i] != 0; i++) {
cursor = XcursorLibraryLoadImage("left_ptr", name, sizes[i]);
if (cursor->size != sizes[i]) {
if (cursor && cursor->size != sizes[i]) {
XcursorImageDestroy (cursor);
cursor = NULL;
}