Re: gtk_text_insert causes segfault
- From: Aaron Kennedy <aaronk t131 aone net au>
- To: gtk-list redhat com
- Subject: Re: gtk_text_insert causes segfault
- Date: Sun, 27 Jun 1999 22:52:27 +1000
David,
I think you'll find it is the strlen(foobar) causing the seg fault and
not the
gtk_text_insert();
Aaron
David Allen wrote:
> It seems that gtk_text_insert consistently causes a segfault when you
give
> it a null string - of course it was easy enough to build in not to
call that
> if the string I wanted to print happened to be null, but is that the
kind of
> thing that GTK would want to watch for itself, or something that the
> programmer should watch out for himself?
>
> char *foobar = NULL;
> gtk_text_insert(GTK_TEXT(some_text_widget), NULL, NULL, NULL,
> foobar, strlen(foobar));
--
...Unix, MS-DOS, and Windows NT (also known as the Good, the Bad, and the Ugly).
----==-- _ / / \
---==---(_)__ __ ____ __ / / /\ \
--==---/ / _ \/ // /\ \/ / / /_/\ \ \
-=====/_/_//_/\_,_/ /_/\_\ /______\ \ \
A proud member of TeamLinux \_________\/
- From: Aaron Kennedy <aaronk t131 aone net au>
- To: David Allen <opop erols com>
- Subject: Re: gtk_text_insert causes segfault
- Date: Sun, 27 Jun 1999 22:50:00 +1000
David,
I think you'll find it is the strlen(foobar) causing the seg fault and not the
gtk_text_insert();
Aaron
David Allen wrote:
> It seems that gtk_text_insert consistently causes a segfault when you give
> it a null string - of course it was easy enough to build in not to call that
> if the string I wanted to print happened to be null, but is that the kind of
> thing that GTK would want to watch for itself, or something that the
> programmer should watch out for himself?
>
> char *foobar = NULL;
> gtk_text_insert(GTK_TEXT(some_text_widget), NULL, NULL, NULL,
> foobar, strlen(foobar));
--
...Unix, MS-DOS, and Windows NT (also known as the Good, the Bad, and the Ugly).
----==-- _ / / \
---==---(_)__ __ ____ __ / / /\ \
--==---/ / _ \/ // /\ \/ / / /_/\ \ \
-=====/_/_//_/\_,_/ /_/\_\ /______\ \ \
A proud member of TeamLinux \_________\/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]