Don't crash if mime_type is NULL. (#322998, Sadrul Habib Chowdhury)
2005-12-02 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c (get_icon_for_mime_type): Don't crash if mime_type is NULL. (#322998, Sadrul Habib Chowdhury)
This commit is contained in:
		
				
					committed by
					
						
						Matthias Clasen
					
				
			
			
				
	
			
			
			
						parent
						
							b3f1be3b56
						
					
				
				
					commit
					0b1fa236fd
				
			@ -1,3 +1,8 @@
 | 
				
			|||||||
 | 
					2005-12-02  Matthias Clasen  <mclasen@redhat.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* gtk/gtkfilesystemunix.c (get_icon_for_mime_type): Don't crash
 | 
				
			||||||
 | 
						if mime_type is NULL.  (#322998, Sadrul Habib Chowdhury)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2005-12-02  Michael Natterer  <mitch@imendio.com>
 | 
					2005-12-02  Michael Natterer  <mitch@imendio.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	* gtk/gtkmenu.c: applied modified patch from maemo-gtk which
 | 
						* gtk/gtkmenu.c: applied modified patch from maemo-gtk which
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,8 @@
 | 
				
			|||||||
 | 
					2005-12-02  Matthias Clasen  <mclasen@redhat.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* gtk/gtkfilesystemunix.c (get_icon_for_mime_type): Don't crash
 | 
				
			||||||
 | 
						if mime_type is NULL.  (#322998, Sadrul Habib Chowdhury)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2005-12-02  Michael Natterer  <mitch@imendio.com>
 | 
					2005-12-02  Michael Natterer  <mitch@imendio.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	* gtk/gtkmenu.c: applied modified patch from maemo-gtk which
 | 
						* gtk/gtkmenu.c: applied modified patch from maemo-gtk which
 | 
				
			||||||
 | 
				
			|||||||
@ -1284,6 +1284,9 @@ get_icon_for_mime_type (GtkWidget  *widget,
 | 
				
			|||||||
  GString *icon_name;
 | 
					  GString *icon_name;
 | 
				
			||||||
  GdkPixbuf *pixbuf;
 | 
					  GdkPixbuf *pixbuf;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (!mime_type)
 | 
				
			||||||
 | 
					    return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  separator = strchr (mime_type, '/');
 | 
					  separator = strchr (mime_type, '/');
 | 
				
			||||||
  if (!separator)
 | 
					  if (!separator)
 | 
				
			||||||
    return NULL; /* maybe we should return a GError with "invalid MIME-type" */
 | 
					    return NULL; /* maybe we should return a GError with "invalid MIME-type" */
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user