Re: Crash processing g_object_new arguments



On Mon, Nov 09, 2009 at 03:24:04AM -0500, Braden McDaniel wrote:
        OpenvrmlXembedBrowser * const browser =
            OPENVRML_XEMBED_BROWSER(
                g_object_new(OPENVRML_XEMBED_TYPE_BROWSER,
                             "control-host-proxy", host_proxy,
                             "control-host-name", host_name,
                             "dbus-thread-context", dbus_thread_context,
                             "expect-initial-stream", expect_initial_stream,
                             0));

0 is not NULL.
0 has the size of int while NULL has the size of void*.
Matters a lot in vararg list.

Yeti




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]