test/parse.c

Thu, 15 Jul 2021 01:02:07 -0500

author
ivanhoe <ivanhoe@fiscari.de>
date
Thu, 15 Jul 2021 01:02:07 -0500
branch
release-2.x.y
changeset 1429
bd85338d3a9d
parent 319
fc07cdb57a09
child 1393
23e34422bea8
permissions
-rw-r--r--

Fix invalid reads/writes when hiding widget in Finch

Fix invalid reads/writes when hiding widget in Finch

Testing Done:
ran "steps to reproduce" from LIBGNT-13 without getting invalid reads/writes anymore.

Bugs closed: LIBGNT-13

Reviewed at https://reviews.imfreedom.org/r/810/

#include "gntutils.h"

int main()
{
	GntWidget *win, *button;

	gnt_init();

	gnt_util_parse_widgets("<vwindow id='0' fill='0' align='2'><label>This is a test.</label><button id='1'>OK</button></vwindow>", 2, &win, &button);
	g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gnt_widget_destroy), win);
	gnt_widget_show(win);

	gnt_main();

	gnt_quit();
	return 0;
}

mercurial