Revision: 808 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=808&view=rev Author: frlan Date: 2009-07-09 23:14:53 +0000 (Thu, 09 Jul 2009)
Log Message: ----------- GeanyLaTeX: Added some tests
Modified Paths: -------------- trunk/geanylatex/src/latexstructure.c
Modified: trunk/geanylatex/src/latexstructure.c =================================================================== --- trunk/geanylatex/src/latexstructure.c 2009-07-09 21:39:12 UTC (rev 807) +++ trunk/geanylatex/src/latexstructure.c 2009-07-09 23:14:53 UTC (rev 808) @@ -68,6 +68,12 @@ gchar *tmp = NULL; GString *haystack = NULL;
+ if (doc == NULL) + return; + + if (! sci_has_selection(doc->editor->sci)) + return; + sci_start_undo_action(doc->editor->sci); tmp = sci_get_selection_contents(doc->editor->sci); haystack = g_string_new(tmp); @@ -100,6 +106,12 @@ gchar *tmp = NULL; GString *haystack = NULL;
+ if (doc == NULL) + return; + + if (! sci_has_selection(doc->editor->sci)) + return; + tmp = sci_get_selection_contents(doc->editor->sci); haystack = g_string_new(tmp);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.