X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fuisupport%2Fabstractbuffercontainer.cpp;h=922e2e9b387d8ea2619fcfd18237af7b2a80cfc6;hb=082cb8c8eb6db90cbb2166a0098874e76d5c6ad9;hp=ca066d0bf1b95ccab4e7a030dcc87ed51d0e02f7;hpb=a95ad2de573027f9bee36db972bcae4195168d0c;p=quassel.git diff --git a/src/uisupport/abstractbuffercontainer.cpp b/src/uisupport/abstractbuffercontainer.cpp index ca066d0b..922e2e9b 100644 --- a/src/uisupport/abstractbuffercontainer.cpp +++ b/src/uisupport/abstractbuffercontainer.cpp @@ -46,6 +46,10 @@ void AbstractBufferContainer::rowsAboutToBeRemoved(const QModelIndex& parent, in } else { // check if there are explicitly buffers removed + // Make sure model is valid first + if (!parent.model()) { + return; + } for (int i = start; i <= end; i++) { QVariant variant = parent.model()->index(i, 0, parent).data(NetworkModel::BufferIdRole); if (!variant.isValid())