X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fstate_text.cpp;h=8f7d0c9a00a0fb0376e9783a1b90687dbdeda750;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=8eda9814ce6c49ada21960e6cc22882770801640;hpb=4a6b5f2e444558761c4e8afccaa61fb2c58ec593;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/state_text.cpp b/synfig-studio/trunk/src/gtkmm/state_text.cpp index 8eda981..8f7d0c9 100644 --- a/synfig-studio/trunk/src/gtkmm/state_text.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_text.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -399,6 +400,12 @@ StateText_Context::make_text(const Point& _point) App::dialog_entry(_("Text Entry"), _("Enter text here:"), text); layer=get_canvas_interface()->add_layer_to("text",canvas,depth); + if (!layer) + { + get_canvas_view()->get_ui_interface()->error(_("Unable to create layer")); + group.cancel(); + return; + } layer_selection.push_back(layer); layer->set_param("origin",point);