Commit fa00f3e5 authored by Brian Cameron's avatar Brian Cameron

Fix casting problem in gmodule code.

This fixes bug 579884.  Previously the return value of g_slist_find_custom was
being recasted as type (GtkModuleInfo *).  This patch sets the return value
to a temporary variable of type (GSList *), and sets info to temp->data.  This
avoids a crashing problem.
parent 459b6a2e
...@@ -289,9 +289,16 @@ load_module (GSList *module_list, ...@@ -289,9 +289,16 @@ load_module (GSList *module_list,
g_module_close (module); g_module_close (module);
else else
{ {
GSList *temp;
success = TRUE; success = TRUE;
info = (GtkModuleInfo *) g_slist_find_custom (gtk_modules, module, info = NULL;
temp = g_slist_find_custom (gtk_modules, module,
(GCompareFunc)cmp_module); (GCompareFunc)cmp_module);
if (temp != NULL)
info = temp->data;
if (!info) if (!info)
{ {
info = g_new0 (GtkModuleInfo, 1); info = g_new0 (GtkModuleInfo, 1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment