8719: AttributeError: 'NoneType' object has no attribute 'set_cursor'

This commit is contained in:
Doug Blank 2015-07-20 07:55:10 -04:00
parent 6cc3ec2eff
commit 4358bb9f94

View File

@ -532,16 +532,17 @@ class DisplayState(Callback):
return return
else: else:
self.busy = value self.busy = value
if value: if self.window.get_window():
self.cursor = self.window.get_window().get_cursor() if value:
self.window.get_window().set_cursor(self.BUSY_CURSOR) self.cursor = self.window.get_window().get_cursor()
else: self.window.get_window().set_cursor(self.BUSY_CURSOR)
self.window.get_window().set_cursor(self.cursor) else:
if self.window.get_window().is_visible(): self.window.get_window().set_cursor(self.cursor)
#avoid critical gdk error: if self.window.get_window().is_visible():
#Gdk-CRITICAL **: gdk_error_trap_pop_internal: assertion `trap != NULL' failed #avoid critical gdk error:
#only process events if window is actually visible #Gdk-CRITICAL **: gdk_error_trap_pop_internal: assertion `trap != NULL' failed
process_pending_events() #only process events if window is actually visible
process_pending_events()
def set_open_widget(self, widget): def set_open_widget(self, widget):
self.widget = widget self.widget = widget