prevent konsole from crashing.

fix taken from kde-current.
This commit is contained in:
espie 2002-12-02 23:13:22 +00:00
parent c0ada65aac
commit c30d3e91ce

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-konsole_konsole_konsole_cpp,v 1.1 2002/12/02 23:13:22 espie Exp $
--- konsole/konsole/konsole.cpp.orig Mon Dec 2 23:56:15 2002
+++ konsole/konsole/konsole.cpp Tue Dec 3 00:05:03 2002
@@ -357,7 +357,7 @@ void Konsole::makeGUI()
// Remove the empty separator Qt inserts if the menu is empty on popup,
// not sure if this will be "fixed" in Qt, for now use this hack (malte)
if(!(isRestored)) {
- if (sender()->inherits("QPopupMenu") &&
+ if (sender() && sender()->inherits("QPopupMenu") &&
static_cast<const QPopupMenu *>(sender())->count() == 1)
const_cast<QPopupMenu *>(static_cast<const QPopupMenu *>(sender()))->removeItemAt(0);
}