[vlc-commits] [Git][videolan/vlc][master] qt: fix stack overflow in `OpenUrlDialog`

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Jun 16 08:22:53 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
c3b0aaf5 by Fatih Uzunoglu at 2025-06-16T08:08:44+00:00
qt: fix stack overflow in `OpenUrlDialog`

Due to my oversight in 6a330a63, there is
stack overflow here because `play()` calls
`accept()`, and `accept()` calls `play()`.

- - - - -


2 changed files:

- modules/gui/qt/dialogs/open/openurl.cpp
- modules/gui/qt/dialogs/open/openurl.hpp


Changes:

=====================================
modules/gui/qt/dialogs/open/openurl.cpp
=====================================
@@ -82,13 +82,11 @@ OpenUrlDialog::OpenUrlDialog( qt_intf_t *_p_intf,
 void OpenUrlDialog::enqueue()
 {
     bShouldEnqueue = true;
-    lastUrl = edit->text().trimmed();
     accept();
 }
 
 void OpenUrlDialog::play()
 {
-    lastUrl = edit->text().trimmed();
     accept();
 }
 
@@ -134,3 +132,9 @@ void OpenUrlDialog::showEvent( QShowEvent* )
             edit->setText( txt );
     }
 }
+
+void OpenUrlDialog::accept()
+{
+    lastUrl = edit->text().trimmed();
+    QVLCDialog::accept();
+}


=====================================
modules/gui/qt/dialogs/open/openurl.hpp
=====================================
@@ -55,7 +55,7 @@ public:
     void showEvent( QShowEvent *ev ) override;
 
 public slots:
-    void accept() override { play(); QVLCDialog::accept(); }
+    void accept() override;
 
 };
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c3b0aaf5c236c12398bda0aa353abbdae4ad9e56

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c3b0aaf5c236c12398bda0aa353abbdae4ad9e56
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list