Commit 0e1f7a8
committed
Do more robust test of whether global objects are accessible.
PyImport_ImportModule() is not guaranteed to return a module object.
When another type of object was returned, the PyModule_GetDict() call
return NULL and the subsequent GetItem() seg faulted.
Bug fix candidate.1 parent f2a0473 commit 0e1f7a8
1 file changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1719 | 1719 | | |
1720 | 1720 | | |
1721 | 1721 | | |
1722 | | - | |
1723 | | - | |
1724 | | - | |
1725 | | - | |
| 1722 | + | |
1726 | 1723 | | |
1727 | 1724 | | |
1728 | 1725 | | |
1729 | 1726 | | |
1730 | 1727 | | |
1731 | 1728 | | |
1732 | 1729 | | |
| 1730 | + | |
1733 | 1731 | | |
1734 | 1732 | | |
1735 | 1733 | | |
1736 | 1734 | | |
1737 | 1735 | | |
| 1736 | + | |
1738 | 1737 | | |
1739 | 1738 | | |
1740 | 1739 | | |
| |||
0 commit comments