File mozilla-aarch64-startup-crash.patch of Package MozillaFirefox.11699

# HG changeset patch
# User msirringhaus@suse.de
# Date 1560926123 -7200
#      Wed Jun 19 08:35:23 2019 +0200
# Node ID 4747ae34909fbc0301c16c9aa871b0665c830b55
# Parent  35755b37907016bd083dc8c97909b653b881477e
bsc#991344 - Rpi3: Firefox crashes after a few seconds of usage
bmo#1302554 - ARM/AARCH64: Firefox crashes on NULL nsIChannel** result pointer in nsIOService::NewChannelFromURIWithProxyFlagsInternal()

diff -r 35755b379070 -r 4747ae34909f netwerk/base/nsIOService.cpp
--- a/netwerk/base/nsIOService.cpp	Fri Feb 26 16:20:09 2016 +0000
+++ b/netwerk/base/nsIOService.cpp	Wed Jun 19 08:35:23 2019 +0200
@@ -880,8 +880,14 @@
     }
   }
 
-  channel.forget(result);
-  return NS_OK;
+#if defined(__aarch64__)
+    if (result) {
+        channel.forget(result);
+    }
+#else
+     channel.forget(result);
+#endif
+     return NS_OK;
 }
 
 NS_IMETHODIMP