createStandardContextMenu can return null; guard against that
BUG:246018 svn path=/trunk/KDE/kdelibs/; revision=1156698
This commit is contained in:
parent
e57e1b8c80
commit
87a29d9efc
@ -182,9 +182,11 @@ void TextBrowser::dataUpdated(const QString &sourceName, const Plasma::DataEngin
|
||||
void TextBrowser::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
||||
{
|
||||
QMenu *popup = nativeWidget()->createStandardContextMenu(event->screenPos());
|
||||
if (popup) {
|
||||
popup->exec(event->screenPos());
|
||||
delete popup;
|
||||
}
|
||||
}
|
||||
|
||||
void TextBrowser::resizeEvent(QGraphicsSceneResizeEvent *event)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user