diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-03-31 16:57:45 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-03-31 16:57:45 +0200 |
commit | 4535d3e2bbee2c2d07674323a746e008ebbe9bd3 (patch) | |
tree | 3a0daa8809bbcd9c2d12cdc8b268ccf9a23efade | |
parent | eae6365a39a924b42546846b9edc16850167a0dd (diff) | |
download | cv-4535d3e2bbee2c2d07674323a746e008ebbe9bd3.tar.gz cv-4535d3e2bbee2c2d07674323a746e008ebbe9bd3.tar.bz2 cv-4535d3e2bbee2c2d07674323a746e008ebbe9bd3.zip |
roi: Dont try to unref modification if nothing is modified
-rw-r--r-- | roi.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -177,9 +177,11 @@ key_event(GtkWidget *widget, GdkEventKey *event, gpointer userdata) switch (event->keyval) { case GDK_KEY_d: case GDK_KEY_D: - g_object_unref(roi->modified_input); - roi->modified_input = NULL; - gtk_widget_queue_draw(roi->drawing_area); + if (roi->modified_input) { + g_object_unref(roi->modified_input); + roi->modified_input = NULL; + gtk_widget_queue_draw(roi->drawing_area); + } break; case GDK_KEY_q: case GDK_KEY_Q: |