SF.net SVN: geany-plugins:[1154] trunk/geanylatex/src/geanylatex.c
frlan at users.sourceforge.net
frlan at xxxxx
Tue Feb 16 17:21:10 UTC 2010
Revision: 1154
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1154&view=rev
Author: frlan
Date: 2010-02-16 17:21:10 +0000 (Tue, 16 Feb 2010)
Log Message:
-----------
GeanyLaTeX: Add an extra test against a NULL pointer to avoid a segfault e.g. at shutdown of Geany. Reported by alekkks.
Modified Paths:
--------------
trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/src/geanylatex.c
===================================================================
--- trunk/geanylatex/src/geanylatex.c 2010-02-09 18:46:55 UTC (rev 1153)
+++ trunk/geanylatex/src/geanylatex.c 2010-02-16 17:21:10 UTC (rev 1154)
@@ -300,6 +300,11 @@
static void activate_toolbar_items()
{
+ if (uim == NULL)
+ {
+ return;
+ }
+
toggle_toolbar_item("/ui/glatex_format_toolbar/Bold", TRUE);
toggle_toolbar_item("/ui/glatex_format_toolbar/Underline", TRUE);
toggle_toolbar_item("/ui/glatex_format_toolbar/Centered", TRUE);
@@ -311,6 +316,11 @@
static void deactivate_toolbar_items()
{
+ if (uim == NULL)
+ {
+ return;
+ }
+
toggle_toolbar_item("/ui/glatex_format_toolbar/Bold", FALSE);
toggle_toolbar_item("/ui/glatex_format_toolbar/Underline", FALSE);
toggle_toolbar_item("/ui/glatex_format_toolbar/Centered", FALSE);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Plugins-Commits
mailing list