Activity.get_preview fails for no window in canvas
When an activity deletes the window associated with the canvas, save may fail because Gdk.cairo_create is given an argument of None. Activity continues to run without a window. Reproduced with Chat activity and pressing Stop. Avoid exception by returning None from get_preview when there is no window.
This commit is contained in:
		
							parent
							
								
									e13c4fefab
								
							
						
					
					
						commit
						a77ae5fb57
					
				@ -852,6 +852,9 @@ class Activity(Window, Gtk.Container):
 | 
			
		||||
            return None
 | 
			
		||||
 | 
			
		||||
        window = self.canvas.get_window()
 | 
			
		||||
        if window is None:
 | 
			
		||||
            return None
 | 
			
		||||
 | 
			
		||||
        alloc = self.canvas.get_allocation()
 | 
			
		||||
 | 
			
		||||
        dummy_cr = Gdk.cairo_create(window)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user