[epiphany] Don't crash when network manager is not available



commit 1cb7fb1109aecedd224d03fda202165adf3423a7
Author: Ionut Biru <ibiru archlinux org>
Date:   Mon Sep 26 18:12:40 2011 +0000

    Don't crash when network manager is not available
    
    https://bugzilla.gnome.org/show_bug.cgi?id=659103
    
    Signed-off-by: Ionut Biru <ibiru archlinux org>

 src/ephy-shell.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index bf8eb18..c436da1 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -470,10 +470,11 @@ impl_get_embed_single (EphyEmbedShell *embed_shell)
     priv->embed_single_connected = TRUE;
 
     /* Now we need the net monitor   */
-    ephy_shell_get_net_monitor (shell);
-    ephy_shell_sync_network_status (priv->nm_proxy,
-                                    ephy_network_manager_get_state (priv->nm_proxy),
-                                    shell);
+    if (ephy_shell_get_net_monitor (shell)) {
+        ephy_shell_sync_network_status (priv->nm_proxy,
+                                        ephy_network_manager_get_state (priv->nm_proxy),
+                                        shell);
+    }
   }
 
   return embed_single;



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