app: remove pointless NULL checks

This commit is contained in:
Mikael Magnusson
2013-06-15 23:07:06 +02:00
parent ad0d43da87
commit 0091645129
5 changed files with 9 additions and 15 deletions

View File

@ -526,8 +526,6 @@ gimp_viewable_deserialize_property (GimpConfig *config,
if (pixbuf)
{
if (icon_pixbuf)
g_object_unref (icon_pixbuf);
icon_pixbuf = pixbuf;
}

View File

@ -229,12 +229,10 @@ file_save_dialog_response (GtkWidget *save_dialog,
g_free (uri);
g_free (basename);
if (dialog)
gimp_file_dialog_set_sensitive (dialog, TRUE);
gimp_file_dialog_set_sensitive (dialog, TRUE);
}
if (dialog)
g_signal_handler_disconnect (dialog, handler_id);
g_signal_handler_disconnect (dialog, handler_id);
}
/*

View File

@ -570,7 +570,7 @@ gimp_bezier_stroke_nearest_point_get (const GimpStroke *stroke,
min_dist = -1;
for (anchorlist = stroke->anchors;
anchorlist && GIMP_ANCHOR (anchorlist->data)->type != GIMP_ANCHOR_ANCHOR;
GIMP_ANCHOR (anchorlist->data)->type != GIMP_ANCHOR_ANCHOR;
anchorlist = g_list_next (anchorlist));
segment_start = anchorlist->data;
@ -806,7 +806,7 @@ gimp_bezier_stroke_nearest_tangent_get (const GimpStroke *stroke,
min_dist = -1;
for (anchorlist = stroke->anchors;
anchorlist && GIMP_ANCHOR (anchorlist->data)->type != GIMP_ANCHOR_ANCHOR;
GIMP_ANCHOR (anchorlist->data)->type != GIMP_ANCHOR_ANCHOR;
anchorlist = g_list_next (anchorlist));
segment_start = anchorlist->data;

View File

@ -300,7 +300,7 @@ gimp_session_info_dock_restore (GimpSessionInfoDock *dock_info,
/* Note that if it is a toolbox, we will get here even though we
* don't have any books
*/
for (iter = dock_info ? dock_info->books : NULL;
for (iter = dock_info->books;
iter;
iter = g_list_next (iter))
{
@ -330,7 +330,7 @@ gimp_session_info_dock_restore (GimpSessionInfoDock *dock_info,
* gimp_session_info_book_restore() which explains why the dock
* can contain empty dockbooks at all
*/
if (dock_info && dock_info->books)
if (dock_info->books)
{
GList *books;
@ -360,7 +360,7 @@ gimp_session_info_dock_restore (GimpSessionInfoDock *dock_info,
}
/* if we removed all books again, the dock was destroyed, so bail out */
if (dock_info && dock_info->books && n_books == 0)
if (dock_info->books && n_books == 0)
{
return NULL;
}

View File

@ -1252,10 +1252,8 @@ find_widget_under_pointer (GdkWindow *window,
}
/* We return (x, y) relative to the allocation of event_widget. */
if (x)
*x = child_loc.x;
if (y)
*y = child_loc.y;
*x = child_loc.x;
*y = child_loc.y;
return event_widget;
}