Re: Help with a multi-threaded application. Spot a crash.



On Wed, May 30, 2012 at 08:30:40PM +0100, Osmo Antero wrote:
I have a multi-threaded application that filters data practically
while user types text in an entry-field. But this applications
regularly crashes.

GRegex is not a GObject, it's just POD.  So

    if (G_IS_OBJECT(search->regex))

will surely attempt to read some bogus memory location and crash.
I cannot see why such code is there at all but anyway set search->regex
to NULL if it does not exist and then just use

    if (search->regex)

if necessary.

Yeti




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