Bug 793539 - Gimp stops each time you close a picture
Don't choke when calling gimp_tool_rectangle_set_constraint() while there's no active image, or while the active image has no active layer, which can happen when updating the default aspect ratio of the crop tool. This would previously result in CRITICALs. Additionally, use weak pointers for the crop tool's current_image and current_layer members, to avoid potential dangling pointers. While not currently necessary, this makes the code less dependent on the exact order of events.
Showing with 42 additions and 10 deletions