GtkSearchEngine: Avoid a crash
Add a destroy notify for the data of the callback, so we don't end up leaving a dangling pointer behind for a short while if the native engine is finalized before the simple one. This was showing up as crash when typing and backspacing in the search entry of the file chooser.
This commit is contained in:
		| @ -57,7 +57,8 @@ typedef gboolean (*GtkSearchEngineSimpleIsIndexed) (GFile *location, gpointer da | ||||
|  | ||||
| void             _gtk_search_engine_simple_set_indexed_cb (GtkSearchEngineSimple *engine, | ||||
|                                                            GtkSearchEngineSimpleIsIndexed callback, | ||||
|                                                            gpointer                       data); | ||||
|                                                            gpointer                       data, | ||||
|                                                            GDestroyNotify                 destroy); | ||||
|  | ||||
| G_END_DECLS | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Matthias Clasen
					Matthias Clasen