Avoid incorrect GtkImageMenuItem in PtkAppMenu.
authorJim Huang <jserv.tw@gmail.com>
Tue, 14 Nov 2006 06:41:30 +0000 (06:41 +0000)
committerJim Huang <jserv.tw@gmail.com>
Tue, 14 Nov 2006 06:41:30 +0000 (06:41 +0000)
src/plugins/ptk-app-menu.c

index 0551a9b..a0b164c 100644 (file)
@@ -277,6 +277,8 @@ static gboolean on_menu_item_expose( GtkWidget* item,
     PtkAppMenuItem* data = (PtkAppMenuItem*)user_data;
     if( !data )
         return FALSE;
+    if( !GTK_IS_IMAGE_MENU_ITEM(item) )
+       return FALSE;
     img = GTK_WIDGET(gtk_image_menu_item_get_image((GtkImageMenuItem *) item));
     if( img )
         return FALSE;