better version of the patch

This commit is contained in:
Rex Dieter 2010-06-29 17:38:28 +00:00
parent 0b36370aaf
commit 659f8c9ee5

View File

@ -1,13 +1,12 @@
diff -up qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qapplication.cpp.grass qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qapplication.cpp
diff -up qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp.grass qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp
--- qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp.grass 2010-06-01 21:03:15.000000000 -0500
+++ qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp 2010-06-29 12:07:58.545073715 -0500
@@ -177,6 +177,8 @@ QGuiEventDispatcherGlibPrivate::QGuiEven
memset(&x11EventSource->pollfd, 0, sizeof(GPollFD));
x11EventSource->flags = QEventLoop::AllEvents;
x11EventSource->q = 0;
+ // workaround NULL dereference https://bugzilla.redhat.com/show_bug.cgi?id=498111#c59 -- Rex
+ if (x11EventSource->d)
x11EventSource->d = 0;
diff -up qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp.glib_eventloop_nullcheck qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp
--- qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp.glib_eventloop_nullcheck 2010-06-01 21:03:15.000000000 -0500
+++ qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp 2010-06-29 12:32:48.268074623 -0500
@@ -76,7 +76,7 @@ static gboolean x11EventSourcePrepare(GS
GX11EventSource *source = reinterpret_cast<GX11EventSource *>(s);
return (XEventsQueued(X11->display, QueuedAfterFlush)
|| (!(source->flags & QEventLoop::ExcludeUserInputEvents)
- && !source->d->queuedUserInputEvents.isEmpty()));
+ && source->d && !source->d->queuedUserInputEvents.isEmpty()));
}
g_source_attach(&x11EventSource->source, mainContext);
static gboolean x11EventSourceCheck(GSource *s)