[glib] Don't ref a NULL pointer



commit b9d919bd8f95e9eac7144ec7c413256c3f5cfc56
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date:   Wed Jun 24 10:07:15 2015 +0000

    Don't ref a NULL pointer

 gio/gwin32appinfo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gwin32appinfo.c b/gio/gwin32appinfo.c
index 782e153..a883b24 100644
--- a/gio/gwin32appinfo.c
+++ b/gio/gwin32appinfo.c
@@ -3526,7 +3526,7 @@ g_win32_app_info_new_from_app (GWin32AppInfoApplication *app,
 
   new_info->supported_types[i] = NULL;
 
-  new_info->handler = g_object_ref (handler);
+  new_info->handler = handler ? g_object_ref (handler) : NULL;
 
   return G_APP_INFO (new_info);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]