summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsabetts <sabetts>2003-04-04 18:06:04 +0000
committersabetts <sabetts>2003-04-04 18:06:04 +0000
commit88575670e7968c1c3863ea3b51dc7d4d7fc316f7 (patch)
tree7d267e744c940f419639cfc5577ab55a29318f06
parentf42294c8d8d0d8899f256ae9f233d80f09179d33 (diff)
downloadratpoison-88575670e7968c1c3863ea3b51dc7d4d7fc316f7.zip
(set_active_frame): fix NULL pointer crash bug.
-rw-r--r--ChangeLog2
-rw-r--r--src/split.c9
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4bc7da9..9dd7e08 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2003-04-04 Shawn Betts <sabetts@sfu.ca>
+ * src/split.c (set_active_frame): fix NULL pointer crash bug.
+
* src/actions.c (cmd_setenv): properly parse the environment name
and value using strtok.
diff --git a/src/split.c b/src/split.c
index e62c432..63e63ba 100644
--- a/src/split.c
+++ b/src/split.c
@@ -821,7 +821,14 @@ set_active_frame (rp_window_frame *frame)
win = find_window_number (frame->win_number);
old_frame = current_frame();
- old_win = find_window_number (old_frame->win_number);
+ if (old_frame)
+ {
+ old_win = find_window_number (old_frame->win_number);
+ }
+ else
+ {
+ old_win = NULL;
+ }
/* Make the switch */
give_window_focus (win, old_win);