projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
qtui: Add keyboard/mouse access to version links
[quassel.git]
/
src
/
qtui
/
nicklistwidget.cpp
diff --git
a/src/qtui/nicklistwidget.cpp
b/src/qtui/nicklistwidget.cpp
index
fed4911
..
5ab410b
100644
(file)
--- a/
src/qtui/nicklistwidget.cpp
+++ b/
src/qtui/nicklistwidget.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-20
19
by the Quassel Project *
+ * Copyright (C) 2005-20
20
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-176,8
+176,12
@@
void NickListWidget::rowsAboutToBeRemoved(const QModelIndex& parent, int start,
}
else {
// check if there are explicitly buffers removed
}
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++) {
for (int i = start; i <= end; i++) {
- QVariant variant = parent.
child(i, 0
).data(NetworkModel::BufferIdRole);
+ QVariant variant = parent.
model()->index(i, 0, parent
).data(NetworkModel::BufferIdRole);
if (!variant.isValid())
continue;
if (!variant.isValid())
continue;