63d497b
diff -up firefox-46.0.1/widget/gtk/nsApplicationChooser.cpp.appchooser-crash firefox-46.0.1/widget/gtk/nsApplicationChooser.cpp
63d497b
--- firefox-46.0.1/widget/gtk/nsApplicationChooser.cpp.appchooser-crash	2016-05-03 07:31:12.000000000 +0200
63d497b
+++ firefox-46.0.1/widget/gtk/nsApplicationChooser.cpp	2016-05-12 12:17:44.043729262 +0200
63d497b
@@ -112,7 +112,9 @@ void nsApplicationChooser::Done(GtkWidge
49904cf
 
49904cf
   // A "response" signal won't be sent again but "destroy" will be.
49904cf
   g_signal_handlers_disconnect_by_func(chooser, FuncToGpointer(OnDestroy), this);
49904cf
-  gtk_widget_destroy(chooser);
63d497b
+  // GTK >= 3.18 has a problem with destroying dialog at this stage for some reason.
49904cf
+  // We're going to hide the dialog in this case as a workaround.
63d497b
+  gtk_widget_hide(chooser);
49904cf
 
49904cf
   if (mCallback) {
49904cf
     mCallback->Done(localHandler);