[gimp] app: don't redundantly check for (foo && GIMP_IS_FOO (foo)) in GimpSessionInfo



commit edad544e733e49c136ace2e40e3c0d8208d27474
Author: Michael Natterer <mitch gimp org>
Date:   Mon May 30 23:39:39 2011 +0200

    app: don't redundantly check for (foo && GIMP_IS_FOO (foo)) in GimpSessionInfo

 app/widgets/gimpsessioninfo.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpsessioninfo.c b/app/widgets/gimpsessioninfo.c
index 67f4e1c..f779f81 100644
--- a/app/widgets/gimpsessioninfo.c
+++ b/app/widgets/gimpsessioninfo.c
@@ -462,7 +462,6 @@ gimp_session_info_restore (GimpSessionInfo   *info,
   GtkWidget  *dialog  = NULL;
   GdkDisplay *display = NULL;
   GdkScreen  *screen  = NULL;
-  GList      *iter    = NULL;
 
   g_return_if_fail (GIMP_IS_SESSION_INFO (info));
   g_return_if_fail (GIMP_IS_DIALOG_FACTORY (factory));
@@ -488,8 +487,10 @@ gimp_session_info_restore (GimpSessionInfo   *info,
                                                      info);
     }
 
-  if (dialog && GIMP_IS_DOCK_CONTAINER (dialog))
+  if (GIMP_IS_DOCK_CONTAINER (dialog))
     {
+      GList *iter;
+
       /* We expect expect there to always be docks. In sessionrc files
        * from <= 2.6 not all dock window entries had dock entries, but we
        * take care of that during sessionrc parsing



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