[gcalctool] Fix crash when pasting with empty clipboard



commit b7b9bc76c0dc59c3cbf85127be3898a06c0a8a26
Author: Robin Sonefors <ozamosi flukkost nu>
Date:   Thu Sep 30 17:12:58 2010 +0200

    Fix crash when pasting with empty clipboard

 src/math-equation.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/math-equation.c b/src/math-equation.c
index af68cd1..1cc033d 100644
--- a/src/math-equation.c
+++ b/src/math-equation.c
@@ -473,7 +473,8 @@ static void
 on_paste(GtkClipboard *clipboard, const gchar *text, gpointer data)
 {
     MathEquation *equation = data;
-    math_equation_insert (equation, text);
+    if (text != NULL)
+        math_equation_insert (equation, text);
 }
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]