[geary: 1/3] Remove pointless null-check



commit 83872710bf012d2a2fee57872e9630656e4b5709
Author: Erik Faye-Lund <erik faye-lund collabora com>
Date:   Wed Sep 12 11:45:29 2018 +0200

    Remove pointless null-check
    
    This check can never be null; we already defererence this variable
    before, so we would have seen an NRE here already.

 src/client/application/geary-controller.vala | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index 6cad16ba..94db7488 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -1422,10 +1422,8 @@ public class GearyController : Geary.BaseObject {
         }
         
         // disable copy/move to the new folder
-        if (current_folder != null) {
-            main_window.main_toolbar.copy_folder_menu.enable_disable_folder(current_folder, false);
-            main_window.main_toolbar.move_folder_menu.enable_disable_folder(current_folder, false);
-        }
+        main_window.main_toolbar.copy_folder_menu.enable_disable_folder(current_folder, false);
+        main_window.main_toolbar.move_folder_menu.enable_disable_folder(current_folder, false);
         
         update_ui();
 


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