[vlc-devel] [PATCH] adaptive: playlist: Fix list cleanup
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Thu Dec 10 15:08:15 CET 2020
Calling front() on an empty container is undefined behavior
---
modules/demux/adaptive/playlist/Inheritables.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/demux/adaptive/playlist/Inheritables.cpp b/modules/demux/adaptive/playlist/Inheritables.cpp
index c61b3f0c45..16c1ef4d2f 100644
--- a/modules/demux/adaptive/playlist/Inheritables.cpp
+++ b/modules/demux/adaptive/playlist/Inheritables.cpp
@@ -58,7 +58,7 @@ AttrsNode::AttrsNode(Type t, AttrsNode *parent_)
AttrsNode::~AttrsNode()
{
- while(props.front())
+ while(!props.empty())
{
delete props.front();
props.pop_front();
--
2.29.2
More information about the vlc-devel
mailing list