[vlc-devel] [PATCH 1/2] smb2: don't display blank error (when interrupted)

Thomas Guillem thomas at gllm.fr
Thu Sep 12 16:11:54 CEST 2019


---
 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 5cdbf209b4..e5496a6a31 100644
--- a/modules/access/smb2.c
+++ b/modules/access/smb2.c
@@ -667,9 +667,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;
     }
 
-- 
2.20.1



More information about the vlc-devel mailing list