forked from osmocom/wireshark
Qt: handle a failed open file the right way (CID: 1159174).
Change-Id: Ia639a4b530cc9fdf7b72887031bc029c065d2162 Reviewed-on: https://code.wireshark.org/review/25048 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
727fac4559
commit
c7c5e2abb1
|
@ -111,8 +111,13 @@ void SCTPChunkStatisticsDialog::fillTable(bool all)
|
||||||
} else {
|
} else {
|
||||||
fp = ws_fopen(fname,"r");
|
fp = ws_fopen(fname,"r");
|
||||||
|
|
||||||
if (!fp && errno == ENOENT) {
|
if (!fp) {
|
||||||
init = true;
|
if (errno == ENOENT) {
|
||||||
|
init = true;
|
||||||
|
} else {
|
||||||
|
g_log(NULL, G_LOG_LEVEL_ERROR, "Can't open %s: %s", fname, g_strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_free (fname);
|
g_free (fname);
|
||||||
|
|
Loading…
Reference in New Issue