gimp r27890 - in branches/gimp-2-6: . app/tools
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27890 - in branches/gimp-2-6: . app/tools
- Date: Sun, 4 Jan 2009 12:19:11 +0000 (UTC)
Author: martinn
Date: Sun Jan 4 12:19:11 2009
New Revision: 27890
URL: http://svn.gnome.org/viewvc/gimp?rev=27890&view=rev
Log:
Merged from trunk:
Bug 562213 â Align Tool doesn't work properly if it is the active
tool at startup
* app/tools/gimpaligntool.c: Perform NULL-pointer dodging to avoid
crashing.
Modified:
branches/gimp-2-6/ChangeLog
branches/gimp-2-6/app/tools/gimpaligntool.c
Modified: branches/gimp-2-6/app/tools/gimpaligntool.c
==============================================================================
--- branches/gimp-2-6/app/tools/gimpaligntool.c (original)
+++ branches/gimp-2-6/app/tools/gimpaligntool.c Sun Jan 4 12:19:11 2009
@@ -199,12 +199,19 @@
align_tool = GIMP_ALIGN_TOOL (object);
options = G_OBJECT (gimp_tool_get_options (tool));
+ /* This line of code is evil because it relies on that the 'options'
+ * object is fully constructed before we get here, which is not
+ * guaranteed
+ */
container = GTK_CONTAINER (g_object_get_data (options,
"controls-container"));
- align_tool->controls = gimp_align_tool_controls (align_tool);
- gtk_container_add (container, align_tool->controls);
- gtk_widget_show (align_tool->controls);
+ if (container)
+ {
+ align_tool->controls = gimp_align_tool_controls (align_tool);
+ gtk_container_add (container, align_tool->controls);
+ gtk_widget_show (align_tool->controls);
+ }
return object;
}
@@ -427,8 +434,13 @@
}
for (i = 0; i < ALIGN_TOOL_NUM_BUTTONS; i++)
- gtk_widget_set_sensitive (align_tool->button[i],
- (align_tool->selected_objects != NULL));
+ {
+ if (align_tool->button[i])
+ {
+ gtk_widget_set_sensitive (align_tool->button[i],
+ (align_tool->selected_objects != NULL));
+ }
+ }
align_tool->x1 = align_tool->x0;
align_tool->y1 = align_tool->y0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]