Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
3ccae49f
Commit
3ccae49f
authored
Jan 05, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua: check vlclua_get_playlist_internal() for NULL
parent
78e0f035
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
7 deletions
+19
-7
modules/lua/libs/input.c
modules/lua/libs/input.c
+9
-2
modules/lua/libs/objects.c
modules/lua/libs/objects.c
+10
-5
No files found.
modules/lua/libs/input.c
View file @
3ccae49f
...
...
@@ -62,9 +62,16 @@ input_thread_t * vlclua_get_input_internal( lua_State *L )
return
p_input
;
}
}
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
input_thread_t
*
p_input
=
playlist_CurrentInput
(
p_playlist
);
return
p_input
;
if
(
p_playlist
!=
NULL
)
{
input_thread_t
*
p_input
=
playlist_CurrentInput
(
p_playlist
);
if
(
p_input
)
return
p_input
;
}
return
NULL
;
}
static
int
vlclua_input_item_info
(
lua_State
*
L
)
...
...
modules/lua/libs/objects.c
View file @
3ccae49f
...
...
@@ -128,11 +128,16 @@ static int vlclua_get_vout( lua_State *L )
static
int
vlclua_get_aout
(
lua_State
*
L
)
{
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
audio_output_t
*
p_aout
=
playlist_GetAout
(
p_playlist
);
if
(
p_aout
!=
NULL
)
vlclua_push_vlc_object
(
L
,
(
vlc_object_t
*
)
p_aout
);
else
lua_pushnil
(
L
);
if
(
p_playlist
!=
NULL
)
{
audio_output_t
*
p_aout
=
playlist_GetAout
(
p_playlist
);
if
(
p_aout
!=
NULL
)
{
vlclua_push_vlc_object
(
L
,
(
vlc_object_t
*
)
p_aout
);
return
1
;
}
}
lua_pushnil
(
L
);
return
1
;
}
/*****************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment