From 0028ed54c3bb1c36b44e24700f86e1ae0e282716 Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Tue, 28 Aug 2007 10:40:42 +0000 Subject: Remove some warnings and fix crash in 3D box tool (bzr r3601) --- src/box3d-context.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/box3d-context.cpp') diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp index f5a76655c..8b8b1ca99 100644 --- a/src/box3d-context.cpp +++ b/src/box3d-context.cpp @@ -360,12 +360,11 @@ static gint sp_3dbox_context_root_handler(SPEventContext *event_context, GdkEven bc->ctrl_dragged = event->motion.state & GDK_CONTROL_MASK; - if (event->motion.state & GDK_SHIFT_MASK && !bc->extruded) { + if (event->motion.state & GDK_SHIFT_MASK && !bc->extruded && bc->item) { /* once shift is pressed, set bc->extruded (no need to create further faces; all of them are already created in sp_3dbox_init); since we made the rear face invisible in the beginning to avoid "flashing", we must set its correct style now */ bc->extruded = true; - g_assert (bc->item); SP_3DBOX (bc->item)->faces[5]->set_style (NULL, true); } -- cgit v1.2.3