X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fgtk-contrib%2Fpsppire-sheet.c;h=ecadf742cbb9e0b874bf207ecaeae832072e17b9;hb=b6bdcd272fc808fe886c4873ec1ea3179ca1117c;hp=760b0fd12ad487fca4a1c957e3d395ab741a00e3;hpb=9c3c856e0512309c9c301ee41c2d465dbbe9b8c6;p=pspp diff --git a/lib/gtk-contrib/psppire-sheet.c b/lib/gtk-contrib/psppire-sheet.c index 760b0fd12a..ecadf742cb 100644 --- a/lib/gtk-contrib/psppire-sheet.c +++ b/lib/gtk-contrib/psppire-sheet.c @@ -1,5 +1,5 @@ /* - Copyright (C) 2006, 2008, 2009 Free Software Foundation + Copyright (C) 2006, 2008, 2009, 2011 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2721,13 +2721,17 @@ psppire_sheet_select_range (PsppireSheet *sheet, const PsppireSheetRange *range) void psppire_sheet_unselect_range (PsppireSheet *sheet) { - GdkRectangle area; sheet->select_status = PSPPIRE_SHEET_NORMAL; - rectangle_from_range (sheet, &sheet->range, &area); - area.x++; - area.y++; - gdk_window_invalidate_rect (sheet->sheet_window, &area, FALSE); + if (sheet->sheet_window != NULL) + { + GdkRectangle area; + + rectangle_from_range (sheet, &sheet->range, &area); + area.x++; + area.y++; + gdk_window_invalidate_rect (sheet->sheet_window, &area, FALSE); + } g_signal_emit (sheet, sheet_signals [SELECT_COLUMN], 0, -1); g_signal_emit (sheet, sheet_signals [SELECT_ROW], 0, -1);