aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2014-04-16 16:30:42 +0200
committerDan Gudmundsson <[email protected]>2014-04-16 16:30:42 +0200
commit2fb83e99c6db6fa9537222b20af5f678c75dd584 (patch)
tree09650a0685032308e501a3bc51c9242f8962a068 /lib/observer/src
parent9648c8fbf0fc5504ad71a9a7f8b0c8cc2786cf5b (diff)
downloadotp-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.erl4
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}) ->