diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-07-16 02:33:32 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-07-16 02:33:32 (GMT) |
commit | c4fde5ba0d43482973db964727b9d48a9c2f9f06 (patch) | |
tree | 53393a9c926e177e83df86c78b7a72aa3b226e27 /src/declarative | |
parent | 8f16f6638bf07adb6c782cb173d323402cfa1c81 (diff) | |
download | Qt-c4fde5ba0d43482973db964727b9d48a9c2f9f06.zip Qt-c4fde5ba0d43482973db964727b9d48a9c2f9f06.tar.gz Qt-c4fde5ba0d43482973db964727b9d48a9c2f9f06.tar.bz2 |
Fix crash in anchors.
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/fx/qfxanchors.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/fx/qfxanchors.cpp b/src/declarative/fx/qfxanchors.cpp index 22b9b08..3cfa02f 100644 --- a/src/declarative/fx/qfxanchors.cpp +++ b/src/declarative/fx/qfxanchors.cpp @@ -324,6 +324,8 @@ QFxItem *QFxAnchors::fill() const void QFxAnchors::setFill(QFxItem *f) { Q_D(QFxAnchors); + if (!f) + return; if (f != d->item->itemParent() && f->itemParent() != d->item->itemParent()){ qmlInfo(d->item) << "Can't anchor to an item that isn't a parent or sibling."; return; @@ -351,10 +353,8 @@ QFxItem *QFxAnchors::centeredIn() const void QFxAnchors::setCenteredIn(QFxItem* c) { Q_D(QFxAnchors); - if (!c){ - qmlInfo(d->item) << "Cannot center in null item."; + if (!c) return; - } if (c != d->item->itemParent() && c->itemParent() != d->item->itemParent()){ qmlInfo(d->item) << "Can't anchor to an item that isn't a parent or sibling."; return; |