summaryrefslogtreecommitdiff
path: root/gui-apps/wf-shell/files/wf-shell-0.11-fix-network-crash.patch
blob: 65ada13233770d5056b06ff7b0037413e8617ff8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
I get a crash 100% on Raspberry Pi 5 in th enetwork applet, this avoids it.

https://github.com/WayfireWM/wf-shell/issues/495

--- a/src/util/network/network-widget.cpp
+++ b/src/util/network/network-widget.cpp
@@ -503,6 +503,12 @@ void NetworkControlWidget::remove_vpn(std::string path)
 
 void NetworkControlWidget::add_device(std::shared_ptr<Network> network)
 {
+    /* fix a crash here */
+    if (!network)
+    {
+        return;
+    }
+
     /* GUI doesn't want our null-device */
     if (network->get_path() == "/")
     {