diff options
author | lloyd <[email protected]> | 2006-06-25 12:09:52 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-06-25 12:09:52 +0000 |
commit | e6f36f3a64bee29f22f0f3b68a51ab5308a2c186 (patch) | |
tree | 5cccda48caa6b2514d5b322525f3919458ab800d /src | |
parent | e536c080164185e79d4e302afddc9e3810a9df23 (diff) |
Guard set_timer with a check so it does not set the timer to NULL
Diffstat (limited to 'src')
-rw-r--r-- | src/libstate.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstate.cpp b/src/libstate.cpp index a2a3bbe9a..a7a6b5f6f 100644 --- a/src/libstate.cpp +++ b/src/libstate.cpp @@ -131,8 +131,11 @@ void Library_State::add_allocator(Allocator* allocator) *************************************************/ void Library_State::set_timer(Timer* new_timer) { - delete timer; - timer = new_timer; + if(new_timer) + { + delete timer; + timer = new_timer; + } } /************************************************* |