Kouhei Sutou 2017-11-28 00:19:22 +0900 (Tue, 28 Nov 2017)
New Revision: 45b98cc13f1cd122c92b37941317d98bb00b620a
https://github.com/ruby-gnome2/ruby-gnome2/commit/45b98cc13f1cd122c92b37941317d98bb00b620a
Message:
gio2: add nil check
Modified files:
gio2/lib/gio2/simple-action.rb
Modified: gio2/lib/gio2/simple-action.rb (+6 -2)
===================================================================
--- gio2/lib/gio2/simple-action.rb 2017-11-28 00:19:03 +0900 (a9dc87cfa)
+++ gio2/lib/gio2/simple-action.rb 2017-11-28 00:19:22 +0900 (879aa2770)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 Ruby-GNOME2 Project Team
+# Copyright (C) 2015-2017 Ruby-GNOME2 Project Team
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -21,7 +21,11 @@ module Gio
if parameter_type.is_a?(String)
parameter_type = GLib::VariantType.new(parameter_type)
end
- initialize_raw(name, parameter_type, state)
+ if state
+ initialize_raw(name, parameter_type, state)
+ else
+ initialize_raw(name, parameter_type)
+ end
end
end
end
|