Commit ca80f9d9 authored by Yann Diorcet's avatar Yann Diorcet
Browse files

Add pbuf nullity checks

parent 187aedb4
......@@ -279,8 +279,10 @@ static void linphone_gtk_configure_window(GtkWidget *w, const char *window_name)
linphone_gtk_visibility_set(shown,window_name,w,TRUE);
if (icon_path) {
GdkPixbuf *pbuf=create_pixbuf(icon_path);
gtk_window_set_icon(GTK_WINDOW(w),pbuf);
g_object_unref(G_OBJECT(pbuf));
if(pbuf != NULL) {
gtk_window_set_icon(GTK_WINDOW(w),pbuf);
g_object_unref(G_OBJECT(pbuf));
}
}
}
......@@ -1526,8 +1528,10 @@ static void linphone_gtk_configure_main_window(){
}
if (search_icon){
GdkPixbuf *pbuf=create_pixbuf(search_icon);
gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"directory_search_button_icon")),pbuf);
g_object_unref(G_OBJECT(pbuf));
if(pbuf != NULL) {
gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"directory_search_button_icon")),pbuf);
g_object_unref(G_OBJECT(pbuf));
}
}
if (home){
gchar *tmp;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment