glib r6290 - trunk/gio
- From: awalton svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r6290 - trunk/gio
- Date: Thu, 10 Jan 2008 13:25:41 +0000 (GMT)
Author: awalton
Date: Thu Jan 10 13:25:41 2008
New Revision: 6290
URL: http://svn.gnome.org/viewvc/glib?rev=6290&view=rev
Log:
2008-01-10 A. Walton <awalton svn gnome org>
* gdesktopappinfo.c: (g_app_info_get_all_for_type),
(g_app_info_get_default_for_type):
Check for NULL content types.
Modified:
trunk/gio/ChangeLog
trunk/gio/gdesktopappinfo.c
Modified: trunk/gio/gdesktopappinfo.c
==============================================================================
--- trunk/gio/gdesktopappinfo.c (original)
+++ trunk/gio/gdesktopappinfo.c Thu Jan 10 13:25:41 2008
@@ -1572,7 +1572,8 @@
*
* Gets a list of all #GAppInfo s for a given content type.
*
- * Returns: #GList of #GAppInfo s for given @content_type.
+ * Returns: #GList of #GAppInfo s for given @content_type
+ * or %NULL on error.
**/
GList *
g_app_info_get_all_for_type (const char *content_type)
@@ -1580,6 +1581,8 @@
GList *desktop_entries, *l;
GList *infos;
GDesktopAppInfo *info;
+
+ g_return_val_if_fail (content_type != NULL, NULL);
desktop_entries = get_all_desktop_entries_for_mime_type (content_type);
@@ -1613,7 +1616,7 @@
*
* Gets the #GAppInfo that correspond to a given content type.
*
- * Returns: #GAppInfo for given @content_type.
+ * Returns: #GAppInfo for given @content_type or %NULL on error.
**/
GAppInfo *
g_app_info_get_default_for_type (const char *content_type,
@@ -1621,6 +1624,8 @@
{
GList *desktop_entries, *l;
GAppInfo *info;
+
+ g_return_val_if_fail (content_type != NULL, NULL);
desktop_entries = get_all_desktop_entries_for_mime_type (content_type);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]