about summary refs log tree commit diff
path: root/pkgs/applications/misc/stardict/stardict-3.0.3-compositelookup_cpp.patch
blob: 86825555d9cb48b754e7d8eabbb1c9a305f41b53 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
This patch is from OpenSUSE .src.rpm for the following crash on startup:

ERROR:compositelookup.cpp:53:void CompositeLookup::send_net_dict_request(const string&, const string&): assertion failed: (NetDictRequests.end() == std::find(NetDictRequests.begin(), NetDictRequests.end(), request))

--- dict/src/lib/compositelookup.cpp
+++ dict/src/lib/compositelookup.cpp
@@ -50,8 +50,10 @@
 void CompositeLookup::send_net_dict_request(const std::string& dict_id, const std::string& key)
 {
 	NetDictRequest request(dict_id, key);
-	g_assert(NetDictRequests.end() == std::find(NetDictRequests.begin(), NetDictRequests.end(), request));
-	NetDictRequests.push_back(request);
+	if(NetDictRequests.end() == std::find(NetDictRequests.begin(), NetDictRequests.end(), request))
+	{
+	  NetDictRequests.push_back(request);
+	}
 }
 
 /* returns true if got expected response */