gtk_builder_add_from_file error handling
- From: Gabriele Greco <gabriele greco darts it>
- To: gtk-app-devel-list gnome org
- Subject: gtk_builder_add_from_file error handling
- Date: Wed, 13 Jan 2010 11:52:06 +0100
Sorry last message was sent by accident pushing an hotkey while editing...
This should be the complete version of my question:
I just found that with a builder file with a syntax error my app crashed
with:
*** glibc detected *** ./packager: double free or corruption (out):
0x09aa33d0 ***
I think I'm using gtkbuilder error handling in the right way and
documentation does not suggest my how to use it:
GError *err = NULL;
if (!gtk_builder_add_from_file(builder_, "myfile.xml", &err)) {
if (err) {
cerr << "builder load fail: " << err->message << '\n';
g_free(err); // commenting this solves the crash but other gtk apis
// and examples I've found always free error handling
pointers
}
else
cerr << "builder load fail, unknown error\n";
return false;
}
--
Bye,
Gabry
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]