Attempt to fix crashes of type reported in

TDECRSH-462c534-5e49d10-6c0a952-ef4ca8d-e1a8a91-9c3a359-fc344d2
pull/1/head
Timothy Pearson 11 years ago
parent 0de3bbdb86
commit 0dc3b7ae41

@ -104,6 +104,14 @@ int gtkQtDebug;
Atom kipcCommAtom;
Atom desktopWindowAtom;
static int argc_fake = 1;
static char** argv_fake;
static TDEAboutData aboutData("gtk-qt-engine", I18N_NOOP("gtk-qt-engine"), "v0.1",
"GTK Qt theme engine", TDEAboutData::License_GPL,
"(c) 2011-2014, Trinity Desktop Project",
"A Qt theme engine for GTK Applications", "https://www.trinitydesktop.org/", 0);
void setFillPixmap(GdkPixbuf* buf)
{
if (!gtkQtEnable)
@ -166,18 +174,14 @@ static int dummy_xio_errhandler( Display * )
void createTQApp()
{
int argc = 1;
char** argv;
// Supply it with fake data to keep TDEApplication happy
argv = (char**) malloc(sizeof(char*));
argv[0] = (char*) malloc(sizeof(char) * 19);
strncpy(argv[0], "gtk-qt-application", 19);
argv_fake = (char**) malloc(sizeof(char*));
argv_fake[0] = (char*) malloc(sizeof(char) * 19);
strncpy(argv_fake[0], "gtk-qt-application", 19);
TDEAboutData aboutData("gtk-qt-engine", I18N_NOOP("gtk-qt-engine"), "v0.1",
"GTK Qt theme engine", TDEAboutData::License_GPL,
"(c) 2011, Timothy Pearson",
"message goes here", 0 /* TODO: Website */, "kb9vqf@pearsoncomputing.net");
TDECmdLineArgs::init(argc, argv, &aboutData);
aboutData.addAuthor("Timothy Pearson", I18N_NOOP("Maintainer"), "kb9vqf@pearsoncomputing.net", 0);
aboutData.addAuthor("David Sansome", I18N_NOOP("Original Author"), "me@davidsansome.com", 0);
TDECmdLineArgs::init(argc_fake, argv_fake, &aboutData);
TDEApplication::disableAutoDcopRegistration();
@ -396,9 +400,6 @@ void createTQApp()
gtkQtEnable = true;
}
free(argv[0]);
free(argv);
// Propagate glib events to GTK as needed
if (tqApp) {
TQEventLoop* loop = tqApp->eventLoop();
@ -478,6 +479,9 @@ void destroyTQApp()
}
if (altBackGC != 0)
gtk_gc_release(altBackGC);
free(argv_fake[0]);
free(argv_fake);
}
GdkFilterReturn gdkEventFilter(GdkXEvent *xevent, GdkEvent *gevent, gpointer data)

Loading…
Cancel
Save