summaryrefslogtreecommitdiff
path: root/src/math-equation.c
diff options
context:
space:
mode:
authorSteve Zesch <[email protected]>2012-11-15 19:28:28 -0500
committerSteve Zesch <[email protected]>2012-11-15 19:28:28 -0500
commit9889c1aaec7cabc7fdf425de7824784ce0da9f81 (patch)
tree6cd46d92ba323a35d88a4ae78c45054f3ac65875 /src/math-equation.c
parent94bcd106fd3bfb418e13e8e536542fd0cee49f0d (diff)
downloadmate-calc-9889c1aaec7cabc7fdf425de7824784ce0da9f81.tar.bz2
mate-calc-9889c1aaec7cabc7fdf425de7824784ce0da9f81.tar.xz
Fix crash when pasting with empty clipboard
http://git.gnome.org/browse/gcalctool/commit/?h=gnome-2-32&id=b7b9bc76c0dc59c3cbf85127be3898a06c0a8a26
Diffstat (limited to 'src/math-equation.c')
-rw-r--r--src/math-equation.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/math-equation.c b/src/math-equation.c
index 3450b80..ef86221 100644
--- a/src/math-equation.c
+++ b/src/math-equation.c
@@ -473,7 +473,9 @@ 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);
}