From 12a94fc56862a24d920b57936aca2e7f0f320ac0 Mon Sep 17 00:00:00 2001 From: Alexander Langer Date: Fri, 28 Sep 2001 13:45:27 +0000 Subject: Don't crash if a menu contains no submenus. --- devel/tvision/Makefile | 1 + devel/tvision/files/patch-lib::TMenuView.cc | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 devel/tvision/files/patch-lib::TMenuView.cc (limited to 'devel/tvision') diff --git a/devel/tvision/Makefile b/devel/tvision/Makefile index ea9704c7b432..70181102deb9 100644 --- a/devel/tvision/Makefile +++ b/devel/tvision/Makefile @@ -7,6 +7,7 @@ PORTNAME= tvision PORTVERSION= 0.7 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_SUNSITE} MASTER_SITE_SUBDIR= devel/lang/c++ diff --git a/devel/tvision/files/patch-lib::TMenuView.cc b/devel/tvision/files/patch-lib::TMenuView.cc new file mode 100644 index 000000000000..3401d83fec28 --- /dev/null +++ b/devel/tvision/files/patch-lib::TMenuView.cc @@ -0,0 +1,11 @@ +--- lib/TMenuView.cc.old Fri Sep 28 15:40:42 2001 ++++ lib/TMenuView.cc Fri Sep 28 15:41:40 2001 +@@ -470,7 +470,7 @@ + if( p->command == 0 ) + { + TMenuItem *T; +- if( (T = findHotKey( p->subMenu->items, keyCode )) != 0 ) ++ if( p->subMenu != 0 && (T = findHotKey( p->subMenu->items, keyCode )) != 0 ) + return T; + } + else if( !p->disabled && -- cgit v1.2.3