From: dooglus Date: Sun, 27 Jan 2008 11:45:26 +0000 (+0000) Subject: Fix a warning about returning a reference to a temporary by introducing a memory... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=1e0bb27e6a04f1808c76d4dfe4683ad15ac7af91;p=synfig.git Fix a warning about returning a reference to a temporary by introducing a memory leak instead! I don't think the code should ever be used though, and have added a warning to indicate if it is. git-svn-id: http://svn.voria.com/code@1508 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp b/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp index 98487b6..a7cebe0 100644 --- a/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp +++ b/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp @@ -200,8 +200,11 @@ public: { if(valuewidget) return valuewidget->get_value(); - return synfig::ValueBase(); + + warning("%s:%d this code shouldn't be reached", __FILE__, __LINE__); + return *(new synfig::ValueBase()); } + const Glib::ustring &get_path() { return path;