diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | gtk/gtkmodule.c | 2 | ||||
-rw-r--r-- | pangocairomodule.c | 3 |
3 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,11 @@ +2005-07-02 Gustavo J. A. M. Carneiro <gjc@gnome.org> + + * gtk/gtkmodule.c (init_gtk): Check for cairo module import + failure. + + * pangocairomodule.c (initpangocairo): Check for cairo module + import failure. + Fri Jul 1 18:51:15 PDT 2005 Manish Singh <yosh@gimp.org> * gobject/pygmaincontext.c: unref the underlying GMainContext upon diff --git a/gtk/gtkmodule.c b/gtk/gtkmodule.c index b21b58ed..dc68fca4 100644 --- a/gtk/gtkmodule.c +++ b/gtk/gtkmodule.c @@ -127,6 +127,8 @@ init_gtk(void) #ifdef HAVE_PYCAIRO Pycairo_IMPORT; + if (Pycairo_CAPI == NULL) + return; #endif /* initialise gobject */ init_pygobject(); diff --git a/pangocairomodule.c b/pangocairomodule.c index a5eadb0f..2a3ec9bf 100644 --- a/pangocairomodule.c +++ b/pangocairomodule.c @@ -51,6 +51,9 @@ initpangocairo(void) d = PyModule_GetDict(m); Pycairo_IMPORT; + if (Pycairo_CAPI == NULL) + return; + PyPangoCairoContext_Type.tp_base = &PycairoContext_Type; if (PyType_Ready(&PyPangoCairoContext_Type) < 0) g_return_if_reached(); |