From b62e6bc2b9329b315893021de30dd5846b48fd81 Mon Sep 17 00:00:00 2001
From: mio <stigma@disroot.org>
Date: Fri, 30 Aug 2024 18:25:19 +1000
Subject: Fix crash when showing context menu in DVDs

Signed-off-by: mio <stigma@disroot.org>
---
 src/app/mainWindow.cpp  | 2 +-
 src/app/videoWindow.cpp | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/app/mainWindow.cpp b/src/app/mainWindow.cpp
index ee92f7c..8e01fd5 100644
--- a/src/app/mainWindow.cpp
+++ b/src/app/mainWindow.cpp
@@ -258,7 +258,7 @@ MainWindow::setupActions()
 
    new TDEAction( i18n("Reset Video Scale"), "viewmag1", Key_Equal, videoWindow(), TQ_SLOT(resetZoom()), ac, "reset_zoom" );
    new TDEAction( i18n("Media Information"), "messagebox_info", Key_I, this, TQ_SLOT(streamInformation()), ac, "information" );
-   new TDEAction( i18n("Menu Toggle"), "media-optical-dvd-unmounted", Key_R, engine(), TQ_SLOT(toggleDVDMenu()), ac, "media-optical-dvd-unmounted" );
+   new TDEAction( i18n("Menu Toggle"), "media-optical-dvd-unmounted", Key_R, engine(), TQ_SLOT(toggleDVDMenu()), ac, "toggle_dvd_menu" );
    new TDEAction( i18n("&Capture Frame"), "frame_image", Key_C, this, TQ_SLOT(captureFrame()), ac, "capture_frame" );
 
    new TDEAction( i18n("Video Settings..."), "configure", Key_V, this, TQ_SLOT(configure()), ac, "video_settings" );
diff --git a/src/app/videoWindow.cpp b/src/app/videoWindow.cpp
index 3a57ee8..b005206 100644
--- a/src/app/videoWindow.cpp
+++ b/src/app/videoWindow.cpp
@@ -139,9 +139,12 @@ VideoWindow::contextMenuEvent( TQContextMenuEvent *e )
 
    popup.insertSeparator();
 
-   if( TheStream::url().protocol() == "dvd" )
-      action( "toggle_dvd_menu" )->plug( &popup ),
+   if (TheStream::url().protocol() == "dvd")
+   {
+      action("toggle_dvd_menu")->plug(&popup);
       popup.insertSeparator();
+   }
+
    if( !((TDEToggleAction*)actionCollection()->action( "fullscreen" ))->isChecked() )
       action( "reset_zoom" )->plug( &popup );
    action( "capture_frame" )->plug( &popup );
-- 
cgit v1.2.3

