Skip to content

Commit

Permalink
fix FS#2259 - Insert file as block: crash when inserting block with
Browse files Browse the repository at this point in the history
attribute definitions
  • Loading branch information
qcad committed Jul 15, 2021
1 parent 21fecbe commit c977907
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/core/RLinkedStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,16 @@ QSharedPointer<RLayer> RLinkedStorage::queryLayer(RLayer::Id layerId) const {
}

QSharedPointer<RLayer> RLinkedStorage::queryLayer(const QString& layerName) const {
if (!layerNameMap.contains(layerName)) {
return backStorage->queryLayer(layerName);
if (!layerNameMap.contains(layerName.toLower())) {
QSharedPointer<RLayer> ret = backStorage->queryLayer(layerName);
if (ret.isNull()) {
// safety net: should never happen:
return RMemoryStorage::queryLayer(layerName);
}
return ret;
}
return RMemoryStorage::queryLayer(layerName);

//QSharedPointer<RLayer> ret = RMemoryStorage::queryLayer(layerName);
//if (ret.isNull()) {
// ret = backStorage->queryLayer(layerName);
Expand Down

0 comments on commit c977907

Please sign in to comment.