Crash when using GPtrArray with Dbus
ernaveenverma at gmail.com
Wed Jul 29 04:17:48 PDT 2009
> downloadDaemonGetAllDownloads(DownloadDaemon* DaemonObject,
> GPtrArray** gptrAllDls,
> GError** error)
> GPtrArray* gptr_all_dls = g_ptr_array_sized_new(1);
-- You should directly initialize *gptrAIIDIs here, then add the member in
this, because the above gptr_all_dlls in stack and become out of scope after
this function call.
> gptr_all_dls->len = numDls;
-- You don't need to set the length its dynamic array.
-- you can use GUINT_TO_POINTER(123456)
> *gptrAllDls = gptr_all_dls;
> return TRUE;
> dbus mailing list
> dbus at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dbus