chiark
/
gitweb
/
~mdw
/
tig
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e8159c
)
status: assert that there are always view lines in the status view
author
Jonas Fonseca
<fonseca@diku.dk>
Fri, 17 Aug 2007 21:24:20 +0000
(23:24 +0200)
committer
Jonas Fonseca
<fonseca@diku.dk>
Fri, 17 Aug 2007 21:24:20 +0000
(23:24 +0200)
tig.c
patch
|
blob
|
blame
|
history
diff --git
a/tig.c
b/tig.c
index 6a50972692f783540a962b8349fb5f01a24dd320..0a42ee2fa8cbe93d9c86074159fb41bb7ed9d4e2 100644
(file)
--- a/
tig.c
+++ b/
tig.c
@@
-3147,10
+3147,11
@@
static void
status_update(struct view *view)
{
if (view == VIEW(REQ_VIEW_STATUS)) {
- struct line *line = view->lines
- ? &view->line[view->lineno] : NULL;
+ struct line *line = &view->line[view->lineno];
- if (!line || !line->data) {
+ assert(view->lines);
+
+ if (!line->data) {
report("No file has been chosen");
return;
}