aboutsummaryrefslogtreecommitdiffstats
path: root/PySide
diff options
context:
space:
mode:
Diffstat (limited to 'PySide')
-rw-r--r--PySide/QtGui/glue/qlayout_help_functions.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/PySide/QtGui/glue/qlayout_help_functions.h b/PySide/QtGui/glue/qlayout_help_functions.h
index 41b315376..00f0dbde7 100644
--- a/PySide/QtGui/glue/qlayout_help_functions.h
+++ b/PySide/QtGui/glue/qlayout_help_functions.h
@@ -63,6 +63,9 @@ inline void addLayoutOwnership(QLayout* layout, QLayout* other)
inline void addLayoutOwnership(QLayout* layout, QLayoutItem* item)
{
+ if (!item)
+ return;
+
QWidget* w = item->widget();
if (w)
addLayoutOwnership(layout, w);