summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2011-01-18 14:42:02 -0300
committerRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2011-01-18 14:42:02 -0300
commit3b026ad4c9a2a1487e8409adc87b3f515356d497 (patch)
treeed4bbc170197d980e7eb9841e9cc921bdc380648
parent50e6f7671db7a561a4832e7ddf6cf1eec326fb93 (diff)
downloadpyside-3b026ad4c9a2a1487e8409adc87b3f515356d497.tar.gz
pyside-3b026ad4c9a2a1487e8409adc87b3f515356d497.tar.xz
pyside-3b026ad4c9a2a1487e8409adc87b3f515356d497.zip
Fixed Widget and Layout inject code to avoid problems in armel arch.
-rw-r--r--PySide/QtGui/glue/qlayout_help_functions.h2
-rw-r--r--PySide/QtGui/glue/qwidget_glue.h2
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 8420cb3..90c950a 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 9b20cb5..129a54a 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();