[vlc-commits] smb2: don't display blank error (when interrupted)

Thomas Guillem git at videolan.org
Mon Sep 16 11:46:34 CEST 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Sep 12 16:02:16 2019 +0200| [3924c4e77c2de1613b2e538a1da4c7e308bd552c] | committer: Thomas Guillem

smb2: don't display blank error (when interrupted)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3924c4e77c2de1613b2e538a1da4c7e308bd552c
---

 modules/access/smb2.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/access/smb2.c b/modules/access/smb2.c
index 9c3b19ba5c..c85aa54e56 100644
--- a/modules/access/smb2.c
+++ b/modules/access/smb2.c
@@ -669,9 +669,10 @@ Open(vlc_object_t *p_obj)
 
     if (ret != 0)
     {
-        vlc_dialog_display_error(access,
-                                 _("SMB2 operation failed"), "%s",
-                                 smb2_get_error(sys->smb2));
+        const char *error = smb2_get_error(sys->smb2);
+        if (error && *error)
+            vlc_dialog_display_error(access,
+                                     _("SMB2 operation failed"), "%s", error);
         goto error;
     }
 



More information about the vlc-commits mailing list