mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-26 13:16:21 +02:00
eeshow/gui.c (gui): quit if we couldn't parse (and don't segfault)
This commit is contained in:
parent
fffa29bbb3
commit
ce5111ae07
@ -633,6 +633,7 @@ fail:
|
|||||||
int gui(unsigned n_args, char **args, bool recurse)
|
int gui(unsigned n_args, char **args, bool recurse)
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
|
struct sheet *sheets;
|
||||||
struct gui_ctx ctx = {
|
struct gui_ctx ctx = {
|
||||||
.zoom = 4, /* scale by 1 / 16 */
|
.zoom = 4, /* scale by 1 / 16 */
|
||||||
.panning = 0,
|
.panning = 0,
|
||||||
@ -643,7 +644,12 @@ int gui(unsigned n_args, char **args, bool recurse)
|
|||||||
.aois = NULL,
|
.aois = NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
get_sheets(&ctx, parse_sheets(n_args, args, recurse));
|
sheets = parse_sheets(n_args, args, recurse);
|
||||||
|
if (!sheets) {
|
||||||
|
fprintf(stderr, "no sheets\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
get_sheets(&ctx, sheets);
|
||||||
get_git(&ctx, args[n_args - 1]);
|
get_git(&ctx, args[n_args - 1]);
|
||||||
|
|
||||||
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||||
|
Loading…
Reference in New Issue
Block a user