aboutsummarylogtreecommitdiffstats
path: root/portfolio.c
diff options
context:
space:
mode:
authorAntony Kellermann2018-06-28 08:36:59 -0400
committerAntony Kellermann2018-06-28 08:36:59 -0400
commit489c1bf7fa2eafde0002bfb757bc21634c78aa2c (patch)
tree669fb226b3dd3639b107e5627d2772002254f896 /portfolio.c
parentc02881769c5147932b2c31ac5d94cf7600a3f79f (diff)
downloadaur-489c1bf7fa2eafde0002bfb757bc21634c78aa2c.tar.gz
Fixed wrong password segfault
Diffstat (limited to 'portfolio.c')
-rw-r--r--portfolio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/portfolio.c b/portfolio.c
index 308356efa13e..70b42c5df079 100644
--- a/portfolio.c
+++ b/portfolio.c
@@ -340,6 +340,9 @@ void portfolio_print_all(Info_Array* portfolio_data) {
void portfolio_print_stock(const char* symbol) {
String* pString = portfolio_ncurses_get_plaintext_string(NULL);
+ if (pString == NULL)
+ return;
+
Json* jobj = json_tokener_parse(pString->data);
size_t i = 0, len = json_object_array_length(jobj);
while (i < len && strcmp(