Commit 05c5b687 authored by Mike Wey's avatar Mike Wey
Browse files

Don't call the gsignal functions after the library has been unloaded.

parent 49192d1f
......@@ -277,8 +277,15 @@ public class Container : Widget
{
children = null; //Is this needed?
import std.traits : isPointer;
import gtkd.Loader;
import gobject.c.functions;
import glib.c.functions;
static if ( isPointer!(typeof(g_signal_handlers_disconnect_matched)) )
if ( !Linker.isLoaded(LIBRARY_GOBJECT) )
return;
g_signal_handlers_disconnect_matched(gtkContainer, GSignalMatchType.FUNC, 0, g_quark_from_string("add"), null, &gtkd_container_add, null);
g_signal_handlers_disconnect_matched(gtkContainer, GSignalMatchType.FUNC, 0, g_quark_from_string("remove"), null, &gtkd_container_remove, null);
}
......
......@@ -1054,8 +1054,15 @@ code: start
{
children = null; //Is this needed?
import std.traits : isPointer;
import gtkd.Loader;
import gobject.c.functions;
import glib.c.functions;
static if ( isPointer!(typeof(g_signal_handlers_disconnect_matched)) )
if ( !Linker.isLoaded(LIBRARY_GOBJECT) )
return;
g_signal_handlers_disconnect_matched(gtkContainer, GSignalMatchType.FUNC, 0, g_quark_from_string("add"), null, &gtkd_container_add, null);
g_signal_handlers_disconnect_matched(gtkContainer, GSignalMatchType.FUNC, 0, g_quark_from_string("remove"), null, &gtkd_container_remove, null);
}
......
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