diff options
author | thewisenerd <thewisenerd@protonmail.com> | 2018-10-21 20:17:49 +0530 |
---|---|---|
committer | wm4 <1387750+wm4@users.noreply.github.com> | 2019-09-21 15:39:47 +0200 |
commit | 2a29950020af1cb3d1e0c81c6cf720d308d20eaf (patch) | |
tree | 873588555960caef212c4f5bb3b9ec15ef197771 /input/event.c | |
parent | 3d911d8ef06ddf3992dd6e8e2dce3c1b915742f8 (diff) | |
download | mpv-2a29950020af1cb3d1e0c81c6cf720d308d20eaf.tar.bz2 mpv-2a29950020af1cb3d1e0c81c6cf720d308d20eaf.tar.xz |
input: ignore empty lines on drag-drop mime data
do not outright err and quit the player for this
Diffstat (limited to 'input/event.c')
-rw-r--r-- | input/event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/input/event.c b/input/event.c index 76ddae279c..266e0294e2 100644 --- a/input/event.c +++ b/input/event.c @@ -64,7 +64,7 @@ int mp_event_drop_mime_data(struct input_ctx *ictx, const char *mime_type, while (data.len) { bstr line = bstr_getline(data, &data); line = bstr_strip_linebreaks(line); - if (bstr_startswith0(line, "#")) + if (bstr_startswith0(line, "#") || !line.start[0]) continue; char *s = bstrto0(tmp, line); MP_TARRAY_APPEND(tmp, files, num_files, s); |