From kde-cygwin Sun May 15 23:13:26 2005 From: Andreas Hausladen Date: Sun, 15 May 2005 23:13:26 +0000 To: kde-cygwin Subject: qapplication_win.cpp patch Message-Id: <4287D796.5030708 () gmx ! de> X-MARC-Message: https://marc.info/?l=kde-cygwin&m=111619884900593 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------060306060605000302090508" This is a multi-part message in MIME format. --------------060306060605000302090508 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit The attached patch fixes an access violation when you want to show a modal widget but create a new child widget in the paint event. The issue is that the qt_try_modal() and tryModalHelper() functions do not test for "widget != null" and so tryModalHelper() crashes in that special case. Regards, Andreas Hausladen --------------060306060605000302090508 Content-Type: text/plain; name="qapplication_win.cpp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qapplication_win.cpp.patch" Index: src/kernel/qapplication_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qapplication_win.cpp,v retrieving revision 1.1.2.30.2.66 diff -u -r1.1.2.30.2.66 qapplication_win.cpp --- src/kernel/qapplication_win.cpp 13 May 2005 18:35:13 -0000 1.1.2.30.2.66 +++ src/kernel/qapplication_win.cpp 15 May 2005 23:01:54 -0000 @@ -3022,7 +3022,7 @@ if ( widget && widget->invokeWinEvent( &message ) ) return 1; - if ( app_do_modal ) // modal event handling + if ( app_do_modal && widget ) // modal event handling if ( !qt_try_modal( widget, uMsg, wParam ) ) return 1; --------------060306060605000302090508 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kde-cygwin mailing list kde-cygwin@kde.org https://mail.kde.org/mailman/listinfo/kde-cygwin --------------060306060605000302090508--