summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qlayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qlayout.cpp')
-rw-r--r--src/gui/kernel/qlayout.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gui/kernel/qlayout.cpp b/src/gui/kernel/qlayout.cpp
index 941db8f..f41de11 100644
--- a/src/gui/kernel/qlayout.cpp
+++ b/src/gui/kernel/qlayout.cpp
@@ -148,7 +148,12 @@ QLayout::QLayout(QLayoutPrivate &dd, QLayout *lay, QWidget *w)
} else {
d->topLevel = true;
w->d_func()->layout = this;
- invalidate();
+ QT_TRY {
+ invalidate();
+ } QT_CATCH(...) {
+ w->d_func()->layout = 0;
+ QT_RETHROW;
+ }
}
}
}
@@ -233,7 +238,12 @@ QLayout::QLayout(QWidget *parent, int margin, int spacing, const char *name)
} else {
d->topLevel = true;
parent->d_func()->layout = this;
- invalidate();
+ QT_TRY {
+ invalidate();
+ } QT_CATCH(...) {
+ parent->d_func()->layout = 0;
+ QT_RETHROW;
+ }
}
}
}