Without this change, File|Open that opens a new datasheet yields:
Gdk-CRITICAL **: gdk_window_invalidate_rect_full: assertion
`GDK_IS_WINDOW (window)' failed
I'm not 100% certain that this is the correct fix--perhaps the client
is at fault for calling this function before a window exists?--but it
does avoid the message.
- 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
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
void
psppire_sheet_unselect_range (PsppireSheet *sheet)
{
void
psppire_sheet_unselect_range (PsppireSheet *sheet)
{
sheet->select_status = PSPPIRE_SHEET_NORMAL;
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);
g_signal_emit (sheet, sheet_signals [SELECT_COLUMN], 0, -1);
g_signal_emit (sheet, sheet_signals [SELECT_ROW], 0, -1);