[gnome-builder] take full ref on enum class
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] take full ref on enum class
- Date: Tue, 24 Mar 2015 00:33:57 +0000 (UTC)
commit 3dfdbedc10639132626f3f8f9e56f95d990e42fb
Author: Christian Hergert <christian hergert me>
Date: Sat Mar 21 17:20:38 2015 -0700
take full ref on enum class
this can happen if the first thing you do is run a command from command
bar.
libide/ide-source-view-movements.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libide/ide-source-view-movements.c b/libide/ide-source-view-movements.c
index 032d593..403d97b 100644
--- a/libide/ide-source-view-movements.c
+++ b/libide/ide-source-view-movements.c
@@ -1260,13 +1260,14 @@ _ide_source_view_apply_movement (IdeSourceView *self,
GEnumValue *enum_value;
GEnumClass *enum_class;
- enum_class = g_type_class_peek (IDE_TYPE_SOURCE_VIEW_MOVEMENT);
+ enum_class = g_type_class_ref (IDE_TYPE_SOURCE_VIEW_MOVEMENT);
enum_value = g_enum_get_value (enum_class, movement);
IDE_TRACE_MSG ("movement(%s, extend_selection=%s, exclusive=%s, count=%u)",
enum_value->value_nick,
extend_selection ? "YES" : "NO",
exclusive ? "YES" : "NO",
count);
+ g_type_class_unref (enum_class);
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]