After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698863 - 3.10 - st-icon - missing check for null
3.10 - st-icon - missing check for null
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: st
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-04-25 16:32 UTC by Alban Browaeys
Modified: 2013-05-02 07:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
check if gicon is null before unref. (867 bytes, patch)
2013-04-25 16:32 UTC, Alban Browaeys
committed Details | Review

Description Alban Browaeys 2013-04-25 16:32:46 UTC
Created attachment 242432 [details] [review]
check if gicon is null before unref.

st_icon_set_icon_name check for gicon and priv->gicon equality then unref gicon. If both are null , it fails to unref.

else we could return if icon_name is null (which is the case here) as then gicon is always null (and g_themed_icon_new_with_default_fallbacks seems to always return a gicon if icon_name passed is not null).


  • #0 g_logv
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gmessages.c line 974
  • #1 g_log
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gmessages.c line 1010
  • #2 g_return_if_fail_warning
  • #3 g_object_unref
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gobject.c line 3069
  • #4 st_icon_set_icon_name
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/gnome-shell/src/st/st-icon.c line 547
  • #5 st_icon_set_property
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/gnome-shell/src/st/st-icon.c line 85
  • #6 object_set_property
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gobject.c line 1358
  • #7 g_object_set_property
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gobject.c line 2308
  • #8 object_instance_set_prop
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/gjs/gi/object.c line 365
  • #9 CallJSPropertyOpSetter
    at ./jscntxtinlines.h line 458
  • #10 set
    at ./jsscopeinlines.h line 334
  • #11 js_NativeSet
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsobj.cpp line 4250
  • #12 js::baseops::SetPropertyHelper
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsobj.cpp line 4660
  • #13 setGeneric
    at ./jsobjinlines.h line 96
  • #14 js::SetPropertyOperation
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterpinlines.h line 348
  • #15 js::Interpret
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 2324
  • #16 js::RunScript
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 309
  • #17 js::InvokeKernel
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 363
  • #18 Invoke
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.h line 119
  • #19 js_fun_apply
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsfun.cpp line 912
  • #20 CallJSNative
    at ./jscntxtinlines.h line 372
  • #21 js::InvokeKernel
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 352
  • #22 js::Interpret
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 2414
  • #23 js::RunScript
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 309
  • #24 js::InvokeKernel
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 363
  • #25 Invoke
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.h line 119
  • #26 js::CallOrConstructBoundFunction
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsfun.cpp line 1039
  • #27 CallJSNative
    at ./jscntxtinlines.h line 372
  • #28 js::InvokeKernel
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 352
  • #29 Invoke
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.h line 119
  • #30 js_fun_apply
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsfun.cpp line 912
  • #31 CallJSNative
    at ./jscntxtinlines.h line 372
  • #32 js::InvokeKernel
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 352
  • #33 js::Interpret
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 2414
  • #34 js::RunScript
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 309
  • #35 js::InvokeKernel
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 363
  • #36 Invoke
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.h line 119
  • #37 js_fun_apply
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsfun.cpp line 912
  • #38 CallJSNative
    at ./jscntxtinlines.h line 372
  • #39 js::InvokeKernel
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 352
  • #40 js::Interpret
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 2414
  • #41 js::RunScript
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 309
  • #42 js::InvokeKernel
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 363
  • #43 Invoke
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.h line 119
  • #44 js::CallOrConstructBoundFunction
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsfun.cpp line 1039
  • #45 CallJSNative
    at ./jscntxtinlines.h line 372
  • #46 js::InvokeKernel
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 352
  • #47 Invoke
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.h line 119
  • #48 js::Invoke
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsinterp.cpp line 396
  • #49 JS_CallFunctionValue
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/js17-17.0.0/js/src/jsapi.cpp line 5851
  • #50 gjs_call_function_value
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/gjs/gjs/jsapi-util.c line 720
  • #51 gjs_closure_invoke
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/gjs/gi/closure.c line 276
  • #52 closure_marshal
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/gjs/gi/value.c line 129
  • #53 g_closure_invoke
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gclosure.c line 777
  • #54 signal_emit_unlocked_R
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c line 3584
  • #55 g_signal_emit_valist
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c line 3328
  • #56 g_signal_emit
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c line 3384
  • #57 gvc_mixer_control_open
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/gnome-shell/src/gvc/gvc-mixer-control.c line 3016
  • #58 idle_reconnect
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/gnome-shell/src/gvc/gvc-mixer-control.c line 2965
  • #59 g_timeout_dispatch
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gmain.c line 4417
  • #60 g_main_dispatch
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gmain.c line 3058
  • #61 g_main_context_dispatch
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gmain.c line 3634
  • #62 g_main_context_iterate
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gmain.c line 3705
  • #63 g_main_loop_run
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gmain.c line 3899
  • #64 meta_run
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/mutter/src/core/main.c line 556
  • #65 main
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/gnome-shell/src/main.c line 430
  • #1 g_log
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gmessages.c line 1010
  • #2 g_return_if_fail_warning
  • #3 g_object_unref
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gobject.c line 3069
  • #4 st_icon_set_icon_name
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/gnome-shell/src/st/st-icon.c line 547

Comment 1 drago01 2013-04-29 08:56:34 UTC
Review of attachment 242432 [details] [review]:

Looks good.
Comment 2 drago01 2013-05-02 07:52:19 UTC
I have pushed this.