diff options
author | Dan Gudmundsson <[email protected]> | 2014-04-16 16:30:42 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2014-04-16 16:30:42 +0200 |
commit | 2fb83e99c6db6fa9537222b20af5f678c75dd584 (patch) | |
tree | 09650a0685032308e501a3bc51c9242f8962a068 /lib/observer/src | |
parent | 9648c8fbf0fc5504ad71a9a7f8b0c8cc2786cf5b (diff) | |
download | otp-2fb83e99c6db6fa9537222b20af5f678c75dd584.tar.gz otp-2fb83e99c6db6fa9537222b20af5f678c75dd584.tar.bz2 otp-2fb83e99c6db6fa9537222b20af5f678c75dd584.zip |
observer: Fix range check
Avoids wxWidgets assert if the table is empty
Diffstat (limited to 'lib/observer/src')
-rw-r--r-- | lib/observer/src/observer_tv_table.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/observer/src/observer_tv_table.erl b/lib/observer/src/observer_tv_table.erl index 59fe5b5670..7757dfea53 100644 --- a/lib/observer/src/observer_tv_table.erl +++ b/lib/observer/src/observer_tv_table.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011-2013. All Rights Reserved. +%% Copyright Ericsson AB 2011-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -409,7 +409,7 @@ handle_info({refresh, Min, Min}, State = #state{grid=Grid}) -> wxListCtrl:refreshItem(Grid, Min), %% Avoid assert in wx below if Max is 0 {noreply, State}; handle_info({refresh, Min, Max}, State = #state{grid=Grid}) -> - wxListCtrl:refreshItems(Grid, Min, Max), + Max > 0 andalso wxListCtrl:refreshItems(Grid, Min, Max), {noreply, State}; handle_info(refresh_interval, State = #state{pid=Pid}) -> |