}
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())
void NickListDock::setLocked(bool locked)
{
if (locked) {
- setFeatures(nullptr);
+ setFeatures({});
}
else {
setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable);