<div class="gmail_quote">On Thu, Jun 24, 2010 at 11:18 PM,  <span dir="ltr"><<a href="mailto:git@videolan.org">git@videolan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
vlc | branch: master | Ilkka Ollakka <<a href="mailto:ileoo@videolan.org">ileoo@videolan.org</a>> | Thu Jun 24 18:06:25 2010 +0300| [f9fe9f294474e6c286ff458522e5dd373f92564d] | committer: Ilkka Ollakka<br>
<br>

diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp<br>
index 75d885b..a1f1412 100644<br>
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp<br>
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp<br>
@@ -388,6 +388,9 @@ QVariant PLModel::data( const QModelIndex &index, int role ) const<br>
 /* Seek from current index toward the top and see if index is one of parent nodes */<br>
 bool PLModel::isParent( const QModelIndex &index, const QModelIndex &current ) const<br>
 {<br>
+    if( !index.isValid() )<br>
+        return false;<br>
+<br>
     if( index == current )<br>
         return true;<br></blockquote></div><br>I don't see a reason for this. Invalid QModelIndex does not mean an error or something like that, but means the top item. It is invalid simply because it has no parent, therefore can not have a column and row position within any parent.<br>
<br>And, again, since it is the one and only top item, it is a parent of any other item.<br>