Plug a leak and add a check that we have a toplevel before accessing it.
2008-03-25 Richard Hult <richard@imendio.com> * gdk/quartz/gdkwindow-quartz.c: (gdk_window_quartz_process_all_updates): Plug a leak and add a check that we have a toplevel before accessing it. svn path=/trunk/; revision=19933
This commit is contained in:
		
				
					committed by
					
						
						Richard Hult
					
				
			
			
				
	
			
			
			
						parent
						
							6861b9247f
						
					
				
				
					commit
					7279939331
				
			@ -1,3 +1,9 @@
 | 
			
		||||
2008-03-25  Richard Hult  <richard@imendio.com>
 | 
			
		||||
 | 
			
		||||
	* gdk/quartz/gdkwindow-quartz.c:
 | 
			
		||||
	(gdk_window_quartz_process_all_updates): Plug a leak and add a
 | 
			
		||||
	check that we have a toplevel before accessing it.
 | 
			
		||||
 | 
			
		||||
2008-03-24  Tor Lillqvist  <tml@novell.com>
 | 
			
		||||
 | 
			
		||||
	Bug 524151 - Dragging of 0-byte files results in an empty filename
 | 
			
		||||
 | 
			
		||||
@ -347,11 +347,15 @@ gdk_window_quartz_process_all_updates (void)
 | 
			
		||||
    {
 | 
			
		||||
      GdkWindow *window = tmp_list->data;
 | 
			
		||||
      GdkWindow *toplevel;
 | 
			
		||||
      NSWindow *nswindow;
 | 
			
		||||
 | 
			
		||||
      /* Only flush each toplevel at most once. */
 | 
			
		||||
      toplevel = gdk_window_get_toplevel (window);
 | 
			
		||||
      if (toplevel)
 | 
			
		||||
        {
 | 
			
		||||
          GdkWindowObject *private;
 | 
			
		||||
          GdkWindowImplQuartz *impl;
 | 
			
		||||
          NSWindow *nswindow;
 | 
			
		||||
 | 
			
		||||
      toplevel = gdk_window_get_toplevel (window);
 | 
			
		||||
          private = (GdkWindowObject *) toplevel;
 | 
			
		||||
          impl = (GdkWindowImplQuartz *) private->impl;
 | 
			
		||||
          nswindow = impl->toplevel;
 | 
			
		||||
@ -361,6 +365,7 @@ gdk_window_quartz_process_all_updates (void)
 | 
			
		||||
              [nswindow disableFlushWindow];
 | 
			
		||||
              nswindows = g_slist_prepend (nswindows, nswindow);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
      gdk_window_quartz_process_updates_internal (tmp_list->data);
 | 
			
		||||
 | 
			
		||||
@ -368,14 +373,15 @@ gdk_window_quartz_process_all_updates (void)
 | 
			
		||||
      tmp_list = tmp_list->next;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  while (nswindows) 
 | 
			
		||||
  tmp_list = nswindows;
 | 
			
		||||
  while (tmp_list) 
 | 
			
		||||
    {
 | 
			
		||||
      NSWindow *nswindow = nswindows->data;
 | 
			
		||||
      NSWindow *nswindow = tmp_list->data;
 | 
			
		||||
 | 
			
		||||
      [nswindow enableFlushWindow];
 | 
			
		||||
      [nswindow flushWindow];
 | 
			
		||||
 | 
			
		||||
      nswindows = nswindows->next;
 | 
			
		||||
      tmp_list = tmp_list->next;
 | 
			
		||||
    }
 | 
			
		||||
		    
 | 
			
		||||
  GDK_QUARTZ_RELEASE_POOL;
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user