From 4f72f1d3686a1bf3a249b5b3265d8e10e24014cf Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Tue, 18 Jan 2011 14:42:02 -0300 Subject: Fixed Widget and Layout inject code to avoid problems in armel arch. --- PySide/QtGui/glue/qlayout_help_functions.h | 2 +- PySide/QtGui/glue/qwidget_glue.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PySide/QtGui/glue/qlayout_help_functions.h b/PySide/QtGui/glue/qlayout_help_functions.h index 8420cb3ac..90c950a5f 100644 --- a/PySide/QtGui/glue/qlayout_help_functions.h +++ b/PySide/QtGui/glue/qlayout_help_functions.h @@ -40,7 +40,7 @@ inline void addLayoutOwnership(QLayout* layout, QLayout* other) for (int i=0, i_max=other->count(); i < i_max; i++) { QLayoutItem* item = other->itemAt(i); - if (PyErr_Occurred()) + if (PyErr_Occurred() || !item) return; addLayoutOwnership(layout, item); diff --git a/PySide/QtGui/glue/qwidget_glue.h b/PySide/QtGui/glue/qwidget_glue.h index 9b20cb5ba..129a54a51 100644 --- a/PySide/QtGui/glue/qwidget_glue.h +++ b/PySide/QtGui/glue/qwidget_glue.h @@ -14,7 +14,7 @@ static inline void qwidgetReparentLayout(QWidget *parent, QLayout *layout) for (int i=0; i < layout->count(); i++) { QLayoutItem* item = layout->itemAt(i); - if (PyErr_Occurred()) + if (PyErr_Occurred() || !item) return; QWidget* w = item->widget(); -- cgit v1.2.3